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

Trying to directly run the custom build produces a broken package #523

Closed
pzanitti opened this issue Feb 15, 2018 · 2 comments
Closed

Trying to directly run the custom build produces a broken package #523

pzanitti opened this issue Feb 15, 2018 · 2 comments
Assignees
Labels

Comments

@pzanitti
Copy link

Note: I only tried this with Android, but seems the same for all platforms.

If you run with npm run phonegap -- run android it never connects, it gets stuck at DOWNLOADING.... It fails because of this function:

Uncaught TypeError: Cannot read property 'trim' of undefined
    at getVersion (analytic.js:83)
    at Object.window.phonegap.app.analytic.basicGELF (analytic.js:65)
    at window.onerror (app.js:77)

function getVersion() {
return $('#version').html().split(':')[1].trim().split('<')[0];
};

Since npm run phonegap -- run <version> does not replace the %PHONEGAP_APP_VERSION% placeholder in index.html, the trim() call fails.

What works however is npm run phonegap -- build android and installing the generated .apk with adb, since it does replace %PHONEGAP_APP_VERSION% to YOUR.WIDGET.ID : 1.8.4.

@timkim
Copy link
Contributor

timkim commented Feb 20, 2018

Hi @pzanitti

I've committed a fix - try giving it a go now.

@pzanitti
Copy link
Author

Fixed.

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

No branches or pull requests

2 participants