-
-
Notifications
You must be signed in to change notification settings - Fork 40
WebpackJsonp is not defined error at run-time #303
Comments
@bfv Can you try to update the Angular and WebPack related dependencies to the latest and bundle your application with reset The steps to easily update all related dependencies.
|
Well, what you are suggesting isn't really possible because webpack.config.js is under version control. We had to edit it because of other webpack related stuff. Attached webpack.config.js. |
Any update on this? We are having the same issue and also have a modified webpack.config.js. We install and test builds on a variety of devices. We get the same app crash on launch consistently on the same set of Android devices while other devices work fine. |
Update on this issue: on one of the devices where this error was occurring, I did a factory reset and reinstalled the app and it is working now. Obviously this isn't a solution for users but maybe it will help with root causing. |
@NickIliev I tried your method but it didn't create a new webpack.config.js file and I had to restore it from a copy. I installed nativescript-dev-webpack a few days ago and I also get this error. But it occurs only if I build the app with --snapshot flag. If I don't put that flag there is no problem. |
We removed the --snapshot flag a while ago but are still seeing this issue. This issue showed up on a Pixel API 25 emulator. I deleted and recreated the emulator and the issue went away. Is it possible something in the webpack/ns-build is writing to storage that doesn't get cleaned up properly on app re/uninstall? |
@slmolloy I also had this problem. When I removed android folder under platforms folder, it worked. I think clean up problem is not in the device but in development environment. |
We had tried that, removing platforms, hooks and node_modules then reinstalling dependencies and building fresh. Additionally, we have a CI pipeline in place for our project and the same build installed on different devices would provide different results. On devices where the crash was occurring, new builds would still fail. The exact same build could be installed on a device that was working fine and it would continue to work fine. It really seems like there is an issue with the install/uninstall process when using webpack. |
@slmolloy are you still experiencing this issue with the latest nativescript-dev-webpack. |
We never were able to root cause why the issue showed up in the first place. We were experiencing a similar situation leading to a crash in our iOS app. The iOS crash message provided different information and we were able to fix the issue with additional variable checks and state cleanup on app startup. When we fixed the iOS crash the Android crash also went away so they appear to have been related. |
Same issue here on my current project and also with a brand new project created with sidekick. Sidekick: 1.2.0-v.2018.1.22. (New project with ng+sidedrawer) package.json
output: |
@NickIliev started experiencing this on an already existing project
|
@jogboms can you provide a sample project? Contact me on personal if you can't create public link (community slack: niliev) |
Tell us about the problem
When using webpack the build process works perfectly OK. When I upload it to the playstore (as alfa release) I get errors on several devices in the pre-launch report. Some physical devices give the same errors upon start of the app. When I upload the normal
tns run build
version to the playstore are no issues. The webpack build gives problems with and without the--uglify
flag.Did you verify this is a real problem by searching [Stack Overflow]
This issue resembles #247 but the solution offered isn't applicable (plugin nativescript-dev-android-snapshot isn't used)
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
After running a webpack build (--snapshot --uglify) on most (but not all) devices the follwing error occurs when starting the app:
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Can't share the repo since it contain all sorts of building script (including keys). The build is run as:
(with deployment cert stuff added as well)
The text was updated successfully, but these errors were encountered: