Meteor local server on mobile - Error: Error parsing asset manifest

I have deployed a Meteor app on Heroku.

I have added a platform: Android

When I try I build the app using the meteor build command meteor build --directory ~/builds --server https://my-app.herokuapp.com and the install the apk using adb, I get an error.

I get the same error when trying to run app locally, but with different server: meteor run android-device --mobile-server https://my-app.herokuapp.com

The error is:

Error: Error parsing asset manifest(ā€¦)
(anonymous function) @ webapp.js?hash=2552b0d8c8f134d5763b6897c1be6c9bfa3e9c28:68
(anonymous function) @ webapp_local_server.js:37
cordova.callbackFromNative @ cordova.js:293
processMessage @ cordova.js:1081
processMessages @ cordova.js:1104
pollOnce @ cordova.js:973
pollOnceFromOnlineEvent @ cordova.js:960

It looks like the problem is connected to Meteor local server which runs on mobile.

1 Like

Can you check if https://my-app.herokuapp.com/__cordova/manifest.json actually serves the manifest? I suspect the server may not be serving the Cordova bundle that is needed for hot code push.

How are you building and deploying the server bundle?

It shows me an error, that the route is not found: 0377409d6a0c18690c9e3211c6bdfd72799a31b6.js:113 There is no route for the path: /__cordova/manifest.json

Is there a special way to build the app for server?

I am just using the command: git push heroku master

Iā€™m not familiar with how Heroku builds Meteor apps, but it should make sure to include the Cordova bundle by not removing the mobile platforms and using meteor build --server-only.

Ah, this seems to be a known issue with this build pack, see here. The solution is not to remove the Android platform but add a --server-only argument here.

2 Likes

How should I fix this?

Either make the change yourself and open a pull request, or open an issue and ask the author of the buildpack to make the change.

Thanks for the clue, mate!

Will try to fix it. :slight_smile:

Succesfully fixed the problem, following your suggestions. (y)

Here is the pull request from my branch: https://github.com/AdmitHub/meteor-buildpack-horse/pull/86

Hope it will be merged too. :slight_smile: