Comments (16)
Error #2004
is triggered by Air because a call to a method didn't get the correct set of parameters. I will try to run using SDK 33.1.1.554
(I was using 575
)
Update: I get the same error with AIR SDK 554
.
from apm.
Hi, Sounds like a bug in our code initiating the manifest merge. Do you just have starling installed? It may be that there's nothing for the merge to do, I'll double check it correctly handles that case.
from apm.
Have you modified the apm script at all? The only way i can get that error is if i remove the -workingdir
arg from the adl call
I'm going to add some checks to make sure it's set correctly.
from apm.
No, I'm using the latest apm
from github releases.
$ cat ~/Fovea_AIR_Toolchains/apm/apm
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
#$SCRIPT_DIR/apm.app/Contents/MacOS/apm -workingdir "`pwd`" $@
adl -profile extendedDesktop -cmd "$SCRIPT_DIR/apm.xml" -- -workingdir "`pwd`" -appdir "$SCRIPT_DIR" $@
$ ~/Fovea_AIR_Toolchains/apm/apm generate app-descriptor
Android package name: com.example.project
⣾ Android manifest merging
generate/app-descriptor :: Error #2004: One of the parameters is invalid.
$ cat project.apm
{
"identifier": "com.example.project",
"name": "Project",
"version": "1.0.0"
}
from apm.
What else is in your working directory?
from apm.
verity:test-apm jeko$ ls
project.apm setenv
verity:test-apm jeko$ cat project.apm
{
"identifier": "com.example.project",
"name": "Project",
"filename": null,
"version": "1.0.0",
"versionLabel": null,
"dependencies": [],
"configuration": {},
"repositories": [],
"deployOptions": {}
}
verity:test-apm jeko$ cat setenv
nvm use v12
export PATH="~/Fovea_AIR_Toolchains/air-33.1.1.575/bin:~/Fovea_AIR_Toolchains/apm:$PATH"
verity:test-apm jeko$ ~/Fovea_AIR_Toolchains/apm/apm generate app-descriptor
Android package name: air.com.example.project
⣾ Android manifest merging
generate/app-descriptor :: Error #2004: One of the parameters is invalid.
verity:test-apm jeko$ DEBUG=1 ~/Fovea_AIR_Toolchains/apm/apm generate app-descriptor
SCRIPT_DIR: /Users/jeko/Fovea_AIR_Toolchains/apm
PWD: /Users/jeko/Documents/triominos/test-apm
ARGS: generate app-descriptor
Android package name: air.com.example.project
⣾ Android manifest merging
generate/app-descriptor :: Error #2004: One of the parameters is invalid.
Notice, I'm now editing apm
to add some logs when DEBUG=1
(SCRIPT_DIR
, PWD
, ARGS
, ...)
Also, $@
should be quoted when calling adl
, only matters if one of the arguments has a space in it (might happen with directories).
from apm.
My edited version of apm
script:
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
#$SCRIPT_DIR/apm.app/Contents/MacOS/apm -workingdir "`pwd`" $@
if [ "x$DEBUG" = "x1" ]; then
echo "SCRIPT_DIR: $SCRIPT_DIR"
echo "PWD: $( pwd )"
echo "ARGS: $@"
fi
adl -profile extendedDesktop -cmd "$SCRIPT_DIR/apm.xml" -- -workingdir "$( pwd )" -appdir "$SCRIPT_DIR" "$@"
from apm.
So this is happening when you have no packages installed, and have just run apm init
Can you run it as below:
apm -l debug generate app-descriptor
Must be picking up something weird in the env...
from apm.
It's happening in both cases, I first tried after having installed starling
(as an experiment), then right after apm init
, then after removing the null
in the generated project file (which I though might cause issues).
Trying to build apm
from source so I can dig in deeper (cf other issue).
from apm.
Still in an empty directory only containing the project.apm
file after an apm init
:
$ apm -l debug generate app-descriptor
D::Log::setLogLevel( debug )
D::RunConfig::loadEnvironment()
D::ProcessQueue::checkAndStartNextProcess(): 3
D::LoadMacOSEnvironmentVariablesProcess::start()
D::LoadMacOSEnvironmentVariablesProcess::Process exited with: 0
D::ProcessQueue::process_eventHandler( process_complete )
D::ProcessQueue::checkAndStartNextProcess(): 2
D::LoadProjectDefinitionProcess::start()
D::LoadProjectDefinitionProcess::found project file - loading ...
D::ProcessQueue::process_eventHandler( process_complete )
D::ProcessQueue::checkAndStartNextProcess(): 1
D::LoadUserSettingsProcess::start()
D::ProcessQueue::process_eventHandler( process_complete )
D::ProcessQueue::checkAndStartNextProcess(): 0
D::GenerateAppDescriptorCommand::execute(): ...
D::ProcessQueue::checkAndStartNextProcess(): 4
D::ProcessQueue::checkAndStartNextProcess(): 2
D::ProcessQueue::process_eventHandler( process_complete )
D::ProcessQueue::checkAndStartNextProcess(): 1
Android package name: air.com.example.project
⣾ Android manifest merging
D::ProcessQueue::process_eventHandler( process_failed )
D::ProcessQueue::process_eventHandler( process_failed )
generate/app-descriptor :: Error #2004: One of the parameters is invalid.
from apm.
That error Error #2004: One of the parameters is invalid.
is normally from the File constructor when an invalid path is passed in.
from apm.
This is normally only done with the config paths, mainly the working directory, hence the question about the script etc.
from apm.
Just, in case, I tried running from a different directory and get the same error:
verity:tmp jeko$ cd /tmp
verity:tmp jeko$ mkdir xxx
verity:tmp jeko$ cd xxx/
verity:xxx jeko$ apm init
Creating new project definition file
Application Identifier [com.my.app]:
Application Name [My Application]:
Application Version [1.0.0]:
verity:xxx jeko$ apm generate app-descriptor
Android package name: air.com.my.app
⣾ Android manifest merging
generate/app-descriptor :: Error #2004: One of the parameters is invalid.
from apm.
FYI, I'm digging into the source code now. The error is triggered by APM.config.getJava();
from apm.
This issue was fixed by setting JAVA_HOME=/usr/
- I'll make a PR to have getJava()
try this by default when JAVA_HOME
is not set.
from apm.
Ah, yep that function definitely needs work, doesn't look to handle errors correctly at all currently.. I'm working on another release now so I'll put some better handling in there for it.
from apm.
Related Issues (20)
- Improvement: List outdated packages only on apm outdated HOT 1
- No package found matching : com.distriqt.admob.IronSource@latest ✗ HOT 6
- Can't install any package E::ProcessQueue::Error #3003 HOT 10
- Can't install com.distriqt.ironsource.AdMob Conflict HOT 7
- Different build configurations for similar apps HOT 4
- APM project as template generator HOT 5
- APM giving me errors HOT 5
- APM generate app-descriptor throw Error #1088 HOT 1
- No package found matching HOT 2
- CONFLICT :: fatal error : found [1] conflicting packages HOT 15
- Simple update leaving us with broken project HOT 4
- apm not working with airsdk ver50.1.1 HOT 3
- APM Conflict with Core ANE HOT 17
- Generate Device Specific app-descriptor HOT 6
- No package found matching HOT 4
- minsdkversion too high for old phones? HOT 4
- APM conflicts with Core Ane HOT 3
- apm update - check have access to private packages before uninstalling HOT 35
- apm android project does not ignore ios_simulator assets folder HOT 2
- unable to install anes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apm.