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

iOS - "SyntaxError: Unexpected identifier 'Error'. Expected ')' to end a argument list." #60

Closed
gabaum10 opened this issue Mar 9, 2016 · 5 comments
Assignees

Comments

@gabaum10
Copy link

gabaum10 commented Mar 9, 2016

I'm getting this error when I try to go into offline mode in my app. As best I can tell it is caused by this plugin. If I remove it from my config, everything works correctly.

Unfortunately, it's not giving me any stack trace so I really have no way of debugging this.

My steps to reproduce are:

  • Install
  • Start the app up. Wait a minute for everything to initialize
  • Go into airplane mode to fire the cordova offline handlers.
  • Observe the error in the safari tools

Now I have no idea why it would be throwing a syntax error there and not when it tried to load the script into the view. For the record, this is NOT happening on Android.

@gabaum10
Copy link
Author

gabaum10 commented Mar 9, 2016

If you start the app up with no connection, it throws this error and just sits on the splash screen. You can't even get into the app.

I built in handlers in the initialization sequence to not do the branch handlers if there is no connection, so it's something internal to the plugin that's executing when the connection is lost.

@gabaum10
Copy link
Author

gabaum10 commented Mar 9, 2016

So the app not starting with no connection I mentioned above was actually because of a bug in my error processing code and you can disregard that, go figure. But his error is still happening. I just added a condition to ignore this specific error for the time being so I can still use the plugin.

@aaustin
Copy link
Contributor

aaustin commented Mar 9, 2016

@gabaum10 I've filed this internally and we will hopefully hear something back in the next 10-12 hours. Sorry for the inconvenience.

@renesansz
Copy link
Contributor

Hello @gabaum10,

It seems the iOS gets an error upon calling the DeepLinkHandler method from iOS to Javascript,
For some reason the response should be in form of a JSON string instead of string.

I've submitted my pull request and hopefully this will fix the error.

@renesansz renesansz self-assigned this Mar 11, 2016
@jestoniyap
Copy link
Contributor

@gabaum10 Please check if the issue was fixed then you can close this ticket. Thanks.

@aaustin aaustin closed this as completed Mar 12, 2016
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

4 participants