-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
[TIP] [SOLVED] Nativescript Zip error on tns run ios and android #34
Comments
Do you run this on a device as a standalone app? Which command to run the app? |
I haven't gotten that far yet. I installed the plugin, followed the tutorial by placing the relevant appsync code in the main.ts. I also reinstalled the android & ios platforms as well as reinstalled the npm packages with I've tried running I'm just running the app on a simulator at the moment. Doing a little digging, Is there a webpack thing that needs to be done with {N} 6+? |
Update: I had to installed Nativescript-Zip (from your package.json) and I got passed the webpack errors. I'm still receiving the stacktrace when the app loads:
|
Just for info... here's my package.json:
|
I'm a NS app developer and faced the same error when trying to onboard AppSync today: Followed the standard steps and executed Rather then creating a new issue I thought I'll add this data point here. |
Folks, please just share a repo I can look at. Those little snippets are pretty useless on their own. |
Pushed my change to personal branch: https://github.com/rahultyagiji/foodapp-test/tree/viprsingh This is the commit specifically: https://github.com/rahultyagiji/foodapp-test/commit/023f7eace8c97c0dbe61bd833d24a547486335ae Repro steps are to get the repo and execute |
@viprsingh I can't run your app because of an iOS build error on my machine. I noticed you're not running the latest version of the plugin, so bumping that to 1.0.4 in package.json and cleaning the platforms folder and running @ALL I don't see a direct link between AppSync and the stacktraces you post here, do you? I'd be happy to help, but this is is bit too vague. |
Updated the plugin but still see the issue: https://github.com/rahultyagiji/foodapp-test/commit/415472418d8070c752027ca1c35dc691e176c43d Could you please share the iOS build error when running our app? Perhaps I could help with that and you'd be able to repro this issue. You could also try @razorsyntax do you have solid repro steps for @EddyVerbruggen ? Thanks! |
I don't have solid repro steps... actually... I do, but it doesn't make sense. I install app aync and then I get those errors. I uninstall the plugin (remove all node modules/hooks/etc, remove and add the platforms) and then the errors disappear. I haven't been able to figure what the underlying cause is. I can confidently reproduce the errors by installing this plugin. That's all I got so far... I know it's not a good answer but it's all I got at the moment. lol I'm trying to create a separate repo where I can provide a reproducible code snippet. |
@razorsyntax were you able to create the repo? It'll be really helpful. Thanks! I was able to get app sync working on our app if I only used the iOS emulator. However, on Android emulator, the error comes back. And once the error occurs, then it starts happening on iOS as well. I'm very puzzled. |
Plugin is working only with nativescript@~5. With nativescript@6 I get the same errors as mentioned before. |
@jameszonk I'd love to be able to help with that, but the demo app actually is N6 and it works fine for me: https://github.com/EddyVerbruggen/nativescript-app-sync/tree/master/demo .. ideas? |
yes, you are absolutely right it is working for nativescript 6 but not with angular. My mistake i totally forgot mention that its not working with angular and nativescript 6. For angular and nativescript 5x it works like a charm |
@jameszonk Thanks, I'll bump the demo-ng app in this repo to N6 and see what happens then. |
@jameszonk I've bumped demo-ng to N6 and it all works fine on both platforms (used emulators, but that doesn't matter). Can you please give this a try?
That should install the demo app on your device just fine. At the top of the first page it will say "AppStore version", then look at the log and it should say "update installed". Then kill the app and restart and it should say "CodePush version" at the top of the first page. |
@EddyVerbruggen just tried your demo everything works, and that was very odd, because i did that :) To figure out what was different I started to dig.
Very odd |
This happens to me as well, when I removed the nodemodules resolution like @jameszonk said. It runs without crashing configuration:
|
Do you mean it looks like this after you removed |
In tsconfig.json... Before:
After:
This seemed to have resolved the issue. |
I didn't want to close this until someone else was able to resolve their issue with my last fix. |
@razorsyntax This fixed the issue for me as well. :) |
Thanks, @razorsyntax for that tip! I'll link to it from the readme, and pin this issue as well. Btw, I think this issue will be solved if I would push my fork of nativescript-zip to npm. I'm considering doing so. |
When I run
tns run ios
I get the following message and the app terminates:The following is the stacktrace:
In main.ts:
Any ideas? This also happens with Android, although with a different stacktrace but similar errors.
The text was updated successfully, but these errors were encountered: