Adobe AIR project: "error while loading initial content"

Answered

I'm trying to switch from Adobe FlashBuilder to IntelliJ. I'm completely new to IntelliJ.

So far, I've been unable to test my first AIR project. It's a pure Actionscript project (no Flex).

When I click the debug icon, I get the following errors:

[AIR Debug Launcher]: error while loading initial content
[AIR Debug Launcher]: Process finished with exit code 9

The similar posts I've found suggest the AIR SDK might include no compiler. I think I have the SDK with compiler:

C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK

Correct?

Any ideas?

0
14 comments
Official comment

Do you have antivirus software?


For example, Kaspersky antivirus may decide that debuggable SWF file is dangerous and delete it right after successful compilation. That's why the app fails to start.

Please download and use the complete AIR SDK + Compiler at https://www.adobe.com/devnet/air/air-sdk-download.html or if you need an older version: https://helpx.adobe.com/air/kb/archived-air-sdk-version.html .

Configure IntelliJ IDEA to use this SDK instead and see if it helps.

0
Avatar
Permanently deleted user

This is the one I already had. However, I downloaded it again and tested, but still the same.

0

Could you please share the complete compiler output from the Messages tool window?

0
Avatar
Permanently deleted user

Here it is, from the Messages window:

Information:[Test1]: C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\jbr\bin\java.exe -Dapplication.home=C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -classpath C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\lib\compiler.jar com.adobe.flash.compiler.clients.MXMLC -load-config=C:\Users\username\AppData\Local\JetBrains\IntelliJIdea2020.1\compile-server\test1_17b231bc\_temp_\IntelliJ_IDEA\idea-97AF6CFC-A1FFBF60.xml
Information:[Test1]: WARNING: An illegal reflective access operation has occurred
Information:[Test1]: WARNING: Illegal reflective access by com.google.common.base.internal.Finalizer (file:/C:/Program%20Files/Adobe/Adobe%20Flash%20Builder%204.7%20(64%20Bit)/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/guava-r08.jar) to field java.lang.Thread.inheritableThreadLocals
Information:[Test1]: WARNING: Please consider reporting this to the maintainers of com.google.common.base.internal.Finalizer
Information:[Test1]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Information:[Test1]: WARNING: All illegal access operations will be denied in a future release
Information:[Test1]: Loading configuration: C:\Users\username\AppData\Local\JetBrains\IntelliJIdea2020.1\compile-server\test1_17b231bc\_temp_\IntelliJ_IDEA\idea-97AF6CFC-A1FFBF60.xml
Information:[Test1]: 688 bytes written to C:\Data\Divers\Adobe\AIR\IntelliJ\Test1\out\production\Test1\Main.swf in 0.583 seconds
Information:[Test1]: Compilation successful
Information:19/06/2020 10:11 - Build completed successfully in 1 s 180 ms

And from the debug window:

"C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\jbr\bin\java.exe" "-Dapplication.home=C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK" -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -classpath "C:/Program Files/Adobe/Adobe Flash Builder 4.7 (64 Bit)/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/legacy/fdb.jar" flex.tools.debugger.cli.DebugCLI
Adobe fdb (Flash Player Debugger) [build development]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Waiting for Player to connect
"C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\bin\adl.exe" -profile extendedDesktop C:\Data\Divers\Adobe\AIR\IntelliJ\Test1\out\production\Test1\Main-descriptor.xml C:\Data\Divers\Adobe\AIR\IntelliJ\Test1\out\production\Test1
[AIR Debug Launcher]: error while loading initial content
[AIR Debug Launcher]: Process finished with exit code 9
0

This shows AIR SDK is used from "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK".

What's the version reported by adl.exe? Is it 32.0.0.116?

Can you share a sample project that we can use to reproduce the issue at https://uploads.services.jetbrains.com/ ?

0
Avatar
Permanently deleted user

I've uploaded my test project with the name:

AIR-IntelliJ-Test-Project.zip

It's very basic.

"What's the version reported by adl.exe? Is it 32.0.0.116?"

I'm not sure exactly how I'm supposed to get this information. I added the following AS code to an existing project in FlashBuilder:

trace("Capabilities.version : "+Capabilities.version);

and then launched the project in debugger mode from FlashBuilder.

The output is the following:

Capabilities.version : AND 32,0,0,170

The expected value should have been 32.0.0.116 instead?

Thank you very much for your help. I've spent ages using FlashBuilder, but didn't really need to get into configuration issues, etc. So I'm a bit lost here, but I'm confident that, when I get the proper settings in IntelliJ, I'll be able to use it easily.

0
Avatar
Permanently deleted user

I finally managed to launch the project in debug mode (and compile an EXE file of the app). I'm not sure why. Probably thanks to another command I've launched in between from the menu... ?

0

If you just run adl.exe in the command line, it will print the version, it should be also visible in IntelliJ IDEA configuration:

I've configured your sample project to use the latest AIR SDK from https://www.adobe.com/devnet/air/air-sdk-download.html and it works without issues for me in Run mode:

1

Actually, I stumble into this issue every time I create a new project.
"error while loading initial content"

And I cannot figure out the proper way to get out of this...

Edit:

This option is checked by default:

Project Structure > Project Settings > Modules > Compiler Options > Generate debuggable SWF
 
If I uncheck it, the project runs fine. This is for a new, empty project.
However, I have a whole project with multiple modules that works fine with this option still checked.
 
So I'm a bit puzzled...
0

Denis Rionnet could you please provide a demo project to reproduce a problem?

0

Hi Petr, thank you for helping.

I can provide a demo project, but actually, it's really a new, blank project:

Upload ID: 2020_09_03_GuZFWpimLFWtTX6F (file: Test4.zip)

File > New > Project > Flash >
Target platform: Mobile, Pure ActionScript
Output type: Application
Target devices: Android
Flex/AIR SDK: AIRSDK
Target player: 32.0
Create sample app: Main.as

Next (name, location) > Finish

Project structure > Project Settings > Project > Project SDK :
AIRSDK AIR SDK 32.0.0.116

Run in emulator > "initial content not found Process finished with exit code 8"

File > Project Structure > Modules > (My module) > Compiler Options > Generate debuggable SWF
Checked by default > I uncheck. 

Run in emulator > works fine.

I don't know if it can be useful, but I use the Choose Runtime plugin, with JDK 1.8.0_112-b15 instead of the current version (in order to be able to sign with a SHA-1 certificate).

 

0

You're right: I have Kaspersky, and I find in the logs that it deletes the swf from the output folder.

But then, I wonder why my other project works fine with the debuggable SWF option activated...

0

> why my other project works fine with the debuggable SWF option activated...

No idea :).

Well, you may add project output folder to the excluded folders list in the antivirus settings.

1

Please sign in to leave a comment.