abobe air 3.8 NativeProcess.isSupported issue # startup windows - actionscript-3

(first-post)
i am having a problem with NativeProcess.isSupported.
its a simple app make in abobe flash publish in air 3.8 .exe. everything works great :)
< supportedProfiles> desktop extendedDesktop tv extendedTV < /supportedProfilessetup.>
NativeApplication.nativeApplication.startAtLogin = true //after install, app start auto with win
NativeProcess.isSupported
var file: File = File.applicationDirectory.resolvePath("PC_shutdown.exe") //after timer the pc shutdown
install the setup.exe file run in windows 8, thats work 100% of the time. (manual start)
as in code the app start with windows login (its work) but NativeProcess.isSupported is then false so shutdown.exe will not executed. but when i manual start the app NativeProcess.isSupported is true and .exe is executed.
first run is false > close app > restart then it's true??? i have no idea/logic.
thx

NativeProcess support only works when you package your AIR application as a bundle (i.e. you create a self contained application with a copy of Adobe Air). This is done by specifying the "-target bundle" flag OR "-target native" flag when running adt.
More info on adt bundle/native installer flags

Related

Azure IotHub, UWP, DeviceClient.OpenAsync - timeout

I am trying to connect my UWP app to the Azure IotHub with the code below. I have tried a console app with the same code and it works but not on the UWP app.
I have given all the permissions to the UWP app (internet, and all other after that).
Tried a Get with HttpClient and the internet connection works
I have also tried to use the newest target for the UWP app (Win 10, version 1803)
To connect to the IotHub from my UWP app i am using a nuget package: Microsoft.Azure.Devices.Client v 1.17.1
On the UWP the code stops at await device.OpenAsync() and timeouts after some time
Am i missing something?
The code:
string deviceConnectionString = "<CONNECTION STRING>";
var device = DeviceClient.CreateFromConnectionString(deviceConnectionString);
await device.OpenAsync();
Message bla = new Message(Encoding.ASCII.GetBytes("blablabla"));
await device.SendEventAsync(bla);
UPDATE - FIX
The transport type needs to be defined, guess the default transport type does not work with UWP. When creating the client use this:
var device = DeviceClient.CreateFromConnectionString(deviceConnectionString, TransportType.Amqp_WebSocket_Only);
I have just tested on my RPi3B with your setup such as
compiled for Target version: Win 10, version 1803
Microsoft.Azure.Devices.Client v1.17.1
Microsoft.NETCore.UniversalWindowsPlatform v6.1.7
and the runtime failed (Windows IoT Core 10.0.17723.1000
) with the following error:
Could not load file or assembly 'System.Net.Security, Version=4.0.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
so, the workaround is:
use the Microsoft.Azure.Devices.Client version v1.6.0
after this change my test program Blinky on RPi3B is working.
The latest version client SDK does not work on UWP using AMQP.There is a Github issue#421 here. Please trace this issue. As Roman Kiss mentioned, Microsoft.Azure.Devices.Client version v1.6.0 works fine, you can try to use this version.

not able to debug play framework 2.6.x application in Scala IDE

I am new to Play, I have installed SBT 1.0.2, Scala IDE 4.6.1, from play documentation downloaded play-scala-starter-example project, i want to debug the project, i did following things.
set environment variables SBT_OPTS to -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
tried to run the project with "sbt -jvm-debug 9999 run" but it gives "Not a valid command: jvm-debug"
ran it with "sbt run" and in Scala IDE, i created following configuration,
and added breakpoints in HomeController of sample project, but when i refresh the page running on port 9000 doesnt stop, and when i use "Scala Debugger (Socket Attach) it gives error "Failed to connect to remote VM. Connection timed out." Scala IDE Configuration
I was having trouble setting the enviroment on windows 10 play 2.6, the way I found for play to start listen to the debug port was adding in projectfolder\sbt-dist\conf\sbtconfig , after #Set the extra SBT options:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
though it will open socket every time you run sbt
1) Add sbt eclipse plugin in you project.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")
2) Set the environment as for debugging follow
set SBT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555
sbt run
3) Attache debugger to remote application in eclipse as
i) In Eclipse, right-click your project, then choose Debug As -> Debug Configurations...
ii) Right-click Remote Java Application, then click New.
The host should already be set to localhost. Set the port to 5555 (the default port used by the play debug run command).
iii)Click Apply to save, then Debug to connect to your running Play instance

LIBGDX ios simulator crash. LibGDX / Robovm compiles for 64bit instead of 32bit. What should I do?

My libgdx app starts up on ios simulator and shows ios intro libgdx pic, then crashes.
I get:
[ERROR] Session could not be started: Error Domain=NSPOSIXErrorDomain Code=3 "Unable to run app in Simulator" UserInfo=0x7f853960ff60 {NSUnderlyingError=0x7f8539464ff0 "Failed to lookup the process ID of se.myapp.IOSLauncher after successful launch. Perhaps it crashed after launch.", NSLocalizedFailureReason=An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3), NSLocalizedDescription=Unable to run app in Simulator}
Seems to be related to trying to run 64bit on iPhone 4s, where it is not supported. Does anyone know how to turn off 64bit for robovm in libgdx?
If I change the ios-sim command:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86_64/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
To:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
It works with the old robovm. But for the new version it seems those directories aren't even built at all, so it fails.
Where should I specify the architecture? There is:
<arch>thumbv7</arch>
in robovm.xml but it doesn't seem to do anything?
Has this anything to do with the eclipse integration plugin (I am running from eclipse)?
OK I found out (after about 12 hours of digging)!
I looked in the wrong place all the time. The solution is (in eclipse) to go to Run Configurations / iOS Simulator App / Choose a device and select 32-bit (x86).

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

Code use:
enter code here
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.getProfile("Other");
WebDriver driver = new FirefoxDriver(ffprofile);
driver.get("http://google.com");
:Run the source the Firefox page open but google.com not opening error
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
reg-app-global","addons":{"fiddlerhook#fiddler2.com":{"descriptor":"C:\\Program Files (x86)\\Fiddler2\\FiddlerHook","mtime":1409222185915,"rdfTime":1406724252000}}},{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1411627483703,"rdfTime":1411627483531}}},{"name":"app-profile","addons":{"fxdriver#googlecode.com":{"descriptor":"C:\\Users\\RT-13\\AppData\\Local\\Temp\\anonymous3444483664614526613webdriver-profile\\extensions\\fxdriver#googlecode.com","mtime":1411630550698,"rdfTime":1411630550495}}}]
1411630550942 addons.xpi-utils DEBUG Opening XPI database C:\Users\RT-13\AppData\Local\Temp\anonymous3444483664614526613enter code herewebdriver-profile\extensions.json
1411630550943 addons.xpi DEBUG New add-on fxdriver#googlecode.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: block`enter code here`list is disabled
1411630551091 addons.xpi-utils DEBUG Make addon app-profile:fxdriver#googlecode.com visible
1411630551094 DeferredSave.extensions.json DEBUG Save changes
1411630551095 DeferredSave.extensions.json DEBUG Save changes
1411630551095 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1411630551098 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1411630551098 DeferredSave.extensions.json DEBUG Save changes
1411630551098 DeferredSave.extensions.json DEBUG Save changes
1411630551098 addons.xpi DEBUG New add-on fiddlerhook#fiddler2.com installed in winreg-app-global
Please downgrade the Firefox version to 31 and add the latest selenium standalone server 2.43 library into the build path. This is a common issue that every one face at least once in a week:)
Solution -
1) Upgrade your Selenium Server i.e. selenium jar "selenium-server-standalone-2.xx.x.JAR" TO "selenium-server-standalone-2.45.0.JAR"
2) Upgrade your Selenium Client Driver i.e. selenium libs folder "selenium-java-2.xx.x" TO "selenium-java-2.45.0"
3) Check and Install compatible version of Firefox
This will RESOLVE your problem.. Cheers !!
Refer - Download updated selenium libs & jar i.e. Version 2.45.0

Native Context not available using Leapmotion AS3 ANE file

I´m getting this error while trying to compile a Flashdevelop AIR project:
Native Context not available. The Config class is only available in Adobe AIR.
My setup:
Using Starling.
Using the ANE file from https://github.com/logotype/LeapMotionAS3
Using Flex SDK 4.6.0/AIR 3.8 in Flashdevelop 4.4.4 RTM
Extended Desktop profile is on.
The error fires up when I try to use the controller.config() or screen.* as in:
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
My onConnect();
private function alConectar(event:LeapEvent):void{
trace("conectado");
leap.enableGesture(Gesture.TYPE_SWIPE);
leap.enableGesture(Gesture.TYPE_SCREEN_TAP);
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
if(leap.config().setFloat("Gesture.ScreenTap.MinForwardVelocity", 30.0) && leap.config().setFloat("Gesture.ScreenTap.HistorySeconds", .5) && leap.config().setFloat("Gesture.ScreenTap.MinDistance", 1.0)) leap.config().save();
//etc...
}
The full output:
Running process: C:\Program Files\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\Leap_AirAS3Proj.as3proj" -ipc 8b4c615f-60f6-46ac-aec0-093781073835 -version "3.8.0" -compiler "C:\Program Files\FlashDevelop\Tools\ascsdk" -library "C:\Program Files\FlashDevelop\Library"
Building Leap_AirAS3Proj
mxmlc-cli -load-config="C:\Program Files\FlashDevelop\Tools\ascsdk/frameworks/air-config.xml" -load-config+=obj\Leap_AirAS3ProjConfig.xml -debug=true -inline=true +configname=air -swf-version=21 -o obj\Leap_AirAS3Proj635190875306772137
Running java as: java.exe
Loading configuration: C:\Program Files\FlashDevelop\Tools\ascsdk\frameworks\air-config.xml
Loading configuration: C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3ProjConfig.xml
206311 bytes written to C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3Proj635190875306772137 in 6.156 seconds
Build succeeded
Done(0)
[Starting debug session with FDB]
[Starling] Initialization complete.
[Starling] Display Driver: DirectX9 (Baseline Constrained)
init
conectado
[Fault] exception, information=Error: Native Context not available. The Config class is only available in Adobe AIR.
Already change the bat/SetupSDK to: set FLEX_SDK=C:\Program Files\FlashDevelop\Tools\ascsdk to reflect the SDK (Thanks to Philippe from Flashdevelop).
Any help is welcome.
Regards!