Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with testing the new config file setup #853

Closed
asiripanich opened this issue Feb 1, 2023 · 5 comments
Closed

Problem with testing the new config file setup #853

asiripanich opened this issue Feb 1, 2023 · 5 comments

Comments

@asiripanich
Copy link
Member

I followed the instructions given here but I could not start the phonegap deployment server.

➜  e-mission-phone git:(places-survey) ✗ npm run serve

> edu.berkeley.eecs.emission@2.5.0 serve /Users/amarin/GitHub/tmp/openpath/e-mission-phone
> phonegap --verbose serve

/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/macos-release/index.js:27
        const [name, version] = nameMap.get(release);
                                ^

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at macosRelease (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/macos-release/index.js:27:26)
    at osName (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/os-name/index.js:21:18)
    at new Insight (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/insight/lib/index.js:37:13)
    at Object.<anonymous> (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/cordova/src/telemetry.js:26:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! edu.berkeley.eecs.emission@2.5.0 serve: `phonegap --verbose serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the edu.berkeley.eecs.emission@2.5.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/amarin/.npm/_logs/2023-02-01T00_24_53_551Z-debug.log

Here is the log file:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/amarin/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli   '/Users/amarin/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli   'run',
1 verbose cli   'serve'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.1
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle edu.berkeley.eecs.emission@2.5.0~preserve: edu.berkeley.eecs.emission@2.5.0
6 info lifecycle edu.berkeley.eecs.emission@2.5.0~serve: edu.berkeley.eecs.emission@2.5.0
7 verbose lifecycle edu.berkeley.eecs.emission@2.5.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle edu.berkeley.eecs.emission@2.5.0~serve: PATH: /Users/amarin/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/.bin:/Users/amarin/.nvm/versions/node/v14.18.1/bin:/Users/amarin/.nvm/versions/node/v14.7.0/bin:/opt/homebrew/opt/openjdk@11/bin:/Users/amarin/.julia/juliaup/bin:/Users/amarin/.nvm/versions/node/v14.7.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/homebrew/opt/openjdk@11/bin:/Users/amarin/.sdkman/candidates/gradle/current/bin:/opt/homebrew/Caskroom/mambaforge/base/condabin:/Users/amarin/.julia/juliaup/bin:/Users/amarin/.nvm/versions/node/v14.7.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/amarin/.cargo/bin:/opt/R/arm64/gfortran/bin:/Users/amarin/Library/Android/sdk/tools/bin:/Users/amarin/Library/Android/sdk/tools:/Users/amarin/Library/Android/sdk/platform-tools:/opt/R/arm64/gfortran/bin:/Users/amarin/Library/Android/sdk/tools/bin:/Users/amarin/Library/Android/sdk/tools:/Users/amarin/Library/Android/sdk/platform-tools
9 verbose lifecycle edu.berkeley.eecs.emission@2.5.0~serve: CWD: /Users/amarin/GitHub/tmp/openpath/e-mission-phone
10 silly lifecycle edu.berkeley.eecs.emission@2.5.0~serve: Args: [ '-c', 'phonegap --verbose serve' ]
11 silly lifecycle edu.berkeley.eecs.emission@2.5.0~serve: Returned: code: 1  signal: null
12 info lifecycle edu.berkeley.eecs.emission@2.5.0~serve: Failed to exec serve script
13 verbose stack Error: edu.berkeley.eecs.emission@2.5.0 serve: `phonegap --verbose serve`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/amarin/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (/Users/amarin/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1058:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid edu.berkeley.eecs.emission@2.5.0
15 verbose cwd /Users/amarin/GitHub/tmp/openpath/e-mission-phone
16 verbose Darwin 22.2.0
17 verbose argv "/Users/amarin/.nvm/versions/node/v14.18.1/bin/node" "/Users/amarin/.nvm/versions/node/v14.18.1/bin/npm" "run" "serve"
18 verbose node v14.18.1
19 verbose npm  v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error edu.berkeley.eecs.emission@2.5.0 serve: `phonegap --verbose serve`
22 error Exit status 1
23 error Failed at the edu.berkeley.eecs.emission@2.5.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
@shankari
Copy link
Contributor

shankari commented Feb 1, 2023

@JGreenlee @sebastianbarry can one of you take a look at this and respond to Amarin?

EDIT: Scratch that, this seems to be an issue with cordova. I will respond

@shankari
Copy link
Contributor

shankari commented Feb 1, 2023

@asiripanich this seems to be an issue with the cordova javascript

    at macosRelease (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/macos-release/index.js:27:26)
    at osName (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/os-name/index.js:21:18)
    at new Insight (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/insight/lib/index.js:37:13)
    at Object.<anonymous> (/Users/amarin/GitHub/tmp/openpath/e-mission-phone/node_modules/cordova/src/telemetry.j

The npm run serve CI on the master branch is fine
https://github.com/e-mission/e-mission-phone/actions?query=workflow%3Aosx-serve-install

So.. are you able to run the master branch successfully?
If the master branch also fails (as I expect it will), can you please make sure that you are using the versions of npm, cordova, etc installed by the setup script, and that they are the same as the versions used in the CI?

This is why I set up CI for the repo 😄

@JGreenlee
Copy link

@asiripanich Did you upgrade to MacOS 13 recently?

@JGreenlee
Copy link

JGreenlee commented Feb 1, 2023

@asiripanich

MacOS 13 version compatibility issues should be resolved once we have upgraded versions

As a temporary workaround:
in node_modules/macos-release/index.js (or node_modules/os_name/node_modules/macos-release/index.js, whichever exists on your system)

...
const nameMap = new Map([
	[22, ['Ventura', '13']],  // try to manually add this entry
	[21, ['Monterey', '12']],
	[20, ['Big Sur', '11']],
	[19, ['Catalina', '10.15']],
	[18, ['Mojave', '10.14']],
...

@shankari
Copy link
Contributor

Closing this since we have finished the phone upgrades
e-mission/e-mission-phone#952
e-mission/e-mission-phone#954

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants