-
Notifications
You must be signed in to change notification settings - Fork 139
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
Invalid callback id received by sendPluginResult #208
Comments
We have looked at this for the last few days and aren't getting much further. The issue appears to be in PushWoosh before anything happens on our side, i.e. before the deviceReady event is fired off. This means we can't change any of our logic in our app as we never even reach our code. We're struggling as to understand it, as the error is generic and only happens every so often. We start our app, it hangs with this error, we kill the app, start again and it will work for the next 10-15 starts and then die again. There is no pattern we can determine at all. We can't see anybody else with this issue. We have only gone to PushWoosh 6.2.1 as we received an email from PushWoosh saying we needed to upgrade for IOS 10. We're going to go back to older versions and see what happens. Any help would be great, we're happy to provide as much logging as needed or send you a development build. Rob |
Could you please try 6.2.2 (just committed with SDK update)? |
Have downloaded and rebuilt. The first start failed and the 17th startup failed
Is there something specific thats been done to fix this or is this just a new release? Thanks Rob |
What is also interesting
Since the logging is turned on, we can see when we get sent pushed notifications, so somethings is still running Rob |
We've just done 58 starts and stops of our program and it failed on runs 18, 27, 38 and 58 with the error message
The sequence numbers are interesting, almost always the 7th or 8th and spread by an interval of 10 or 20 run. We simply sat at Xcode and started and stopped the program. We have also pulled out our commercial geolocation plugin as thats quite large and complex, and still and we still got the above results. These are our plugins now com.jcesarmobile.IDFVPlugin 1.0.0 "Identifier For Vendor Plugin" We're using Xcode 7.3.1, we're avoiding Xcode 8 for the moment. We're testing on an iPhone 5s running 8.3 as we know our customers use phones down at this level. Not sure if there is anything else we can add. Rob |
Does anybody from Pushwoosh read these boards? Do paying customers have another mechanism for raising bugs? |
Rob, we do read it and we are already investigating this issue, as soon as we figure out something, we will definitely update this thread. |
Thank you. This is stopping us releasing an iOS 10 update for our app. We are very happy to do anything whatever (thats legal) you need us to do to get to the bottom of this. We can turn around new releases very quickly if that helps. We turned the last update round in 30 mins from memory. Also happy to continue the conversation privately if thats useful as well. Sometimes a running commentary doesn't help. You have our full, undivided attention in getting this resolved! Rob |
We have this issue as well but it is not limited to iOS 10, it happens on iOS 9 as well. We use ionic, and via $ionicPlatform.ready() our app continues to function and initialize itself. However, device registration does not always work, as the success callback for registerDevice does not always get called (and the error callback does not get called either in that case). If we keep restarting the app, sometimes it works, sometimes it does not. What I find odd is that the device is registering itself under the hood, before index.html is loaded, and then registers itself again because we call registerDevice from $ionicPlatform.ready().
You can see the log entry I don't know if the success callback not firing is related however. |
We have the same problem, though ours is actually on iOS 8, not iOS 10. We have some customers on iOS 8 and we have to make sure our code works there. I think but could be completely wrong, that the first registration is simply make a connection and then the next registration, the one where we get the ID back is where we really register the app. However this is purely conjecture. We had certainly seen events being captured by PushWoosh in the log files even though we had the invalid callback, which appears to match what you have seen. I'm not pleased you have the issue as well, but I am pleased it's not just us. We were very worried that it was something in our code or plugins or something that we had got wrong. The fact you have the same issue with much the same config, Ionic etc, means its not just us. Lets see what PushWoosh comes up with. Rob |
I've found a reason for this error. I'll push the update later today. This happens when registerDevice calls the nil phonegap callback. But the code in Cordova is super safe there:
It shouldn't crash your app or prevent it from run any further. |
I'd seen this code already. I recall this code is in the Cordova basecode (but could be wrong). I think that the problem is occurring elsewhere though and this just shows the error. However thats just our guess. It definitely causes an issue, sometimes it stops the deviceReady event and sometimes it doesn't. Other people have reported the same, though its not clear what the common denominator is. Let us know when the code is updated and we'll immediately update and feedback. We spent yesterday refactoring our notifications code so that it works with PushWoosh 4.2.2 and (hopefully) with 6.2.x so we can get a release out real-soon-now. Our next problem is IOS and Xcode 8.0 and Cordova. We really don't want to upgrade :) Rob |
@rwillett |
I phrased my question poorly in the very first post. The app stops but I didn't recall an actual crash, e.g. Xcode showing crash information. It often hung soon after the
and so we never received a device ready event. Sometimes we did though. I used the phrase crash and should have used the hung instead. I cannot recall an actual crash. We're finishing off refactoring notification code this morning (I hope) and will retry with the 6.2.2 PushWoosh code and see if we can generate a crash. if we can, we have no issues with sharing the crash logs. |
Unfortunately I could not reproduce the problem. I've added check for "registerDevice" callback id. If the issue still persists, please try collecting more detailed logs by setting |
If the logs could contain sensitive information, please send it to Pushwoosh support, just note this thread on GitHub, they will send the logs to us. Thanks1 |
Haven't managed to create any crash logs so far. We've just finished a build for alpha testing for IOS 10 using PushWoosh 4.2.2. We'll have try tomorrow with PushWoosh 6.2.2. Rob |
We've just downloaded and built our app with PushWoosh 6.2.5 and we are still having hanging errors, though the original error is no longer being shown. We started the app 42 times and had the following hangs on run 1, 11, 12, 27 and 42. Here's the output from Xcode when it hangs
Sometimes the device ready event would be fired and we can see notifications turning up. However the function pushNotification.registerDevice() is NOT being called which we need as it supplies the deviceToken/pushToken. This is very similar to the last problem. Here's the output if we leave the program running. We can see that we are catching notifications but the pushNotification.registerDevice() has never come back. We highlight the point in the output where we would expect to see it.
We've been through the docs again and we haven't changed our code. We know the code and pushNotification.registerDevice() works under PushWoosh 4.2.2 as we've spent the day testing it. We're happy to send complete code samples and unredacted log files if that helps. Rob |
Just did another run this morning, we ran it 28 times before we had a hang. We've been discussing the issue internally and trying to think what the issue could be. The only suggestions we can come up with are:
We do this as we wanted to handle both PushWoosh 4.2.2 and PushWoosh 6.2.5 plugins. We're going to cut down our registration function to the minimum and see if we can remove the Angular promise. Removing the promise is not easy as we use that sort of pattern all over the place and we have come to rely on it. Any other suggestions welcomed. Rob |
We are also experiencing a problem with registerDevice never returning with any of its two callback functions. Using pushwoosh-cordova-plugin 6.2.5 and device iOS 10.1 (14B72). Haven't checked myself on previous iOS versions but it seems the issue is still there. It's used in an Ionic app, and as far as I an tell this problem has been there for a while (not less than a year) for iOS/and the plugin. For a fresh install and login everything is fine wrt. push but once I log out the user and so unregister we hit the problem with the callbacks. Some time ago this happened now and then (randomish) but now is see the problem always. Great if you can prioritize this case guys. |
We're testing on IOS 8.4 (I know) as customers still have it. We have not really tested on IOS 10 as we didn't want to upgrade to Xcode 8.0 until we'd resolved the Cordova issues with building. We have done a TestFlight build with PushWoosh 4.2.2 and IOS 10 and confirmed that PushWoosh 4.2.2 doesn't work with IOS 10 which is a bummer. We have no need to upgrade to PushWoosh 6.2.5 as we have all the functionality in 4.2.2. No issues so far on Android. We only used PushWoosh 4.2.2 until iOS 10.0 and we needed to upgrade as IOS 10.0 and PushWoosh 4.2.2 don't work together. We've been using 4.2.2 for a long time with no problems. We don't have the concept of login/logout apart from starting the app up, but is sounds as if we have the same issues. We don't have the issue all the time though. It is random, hence we think its a race condition or similar. Rob |
100% positive not calling push unregistration. Didn't even know about it the function :) Sorry Rob |
@rwillett could you try two things for me please.
Uncomment 3 lines below. Try if this fixes your issue. If it doesnt: Just search for CDV_ENABLE_EXEC_LOGGING and you'll see it. And get the logs. Thanks! |
./platforms/ios/Jambuster/Plugins/pushwoosh-cordova-plugin/ios/PushNotification.m as I wasn't sure which is the master and which is the slave. So did them both to make sure :) (I think that ./platforms/ios/Jambuster/Plugins/pushwoosh-cordova-plugin/ios/PushNotification.m is the master though) Compiled as normal. Failed on 7th restart. Heres' the full log from that run.
and failed on 1st and 4th run. Here's the full logs from that failed 4th run. I have also attached the logs from a successful run at the end, this is getting a long reply :) We're going to look through these as well.
This the log files from the successful start. Clearly it has more stuff in as our app has started up. We use a paid for geolocation plugin which is the geolocation stuff in the middle.
and lastly our list of plugins com.jcesarmobile.IDFVPlugin 1.0.0 "Identifier For Vendor Plugin" Hope this helps :) Rob |
Also to be clear, we're NOT using iOS10, we're having this problem with iOS 8. We haven't tried IOS10 very much, indeed this update is to get our app to work on IOS 10. We're testing on IOS8 and IOS8 first. Rob |
@rwillett I might have found a problem. |
Hi, Have you found a problem or the problem? There's a big semantic difference :) Rob |
All the failed logs have registerDevice API call in the very beginning. This is normal, but I think it breaks registerDevice callback. I'm still investigating. |
Ok, we're working at the moment so if you need any logs, shout and we'll do what we can. Rob |
Could you please change the Pushwoosh file in: platforms/ios/%projectname%/Plugins/pushwoosh-cordova-plugin/Pushwoosh and try again? |
OK, downloaded and rebuilt. The downloaded file is twice the size of the old file. How do I know its running the new code? Any output to look for? Up to the 15th run without a hang. I'll keep going for at least 50 runs :( |
It's a debug version. In the log files you should see (in the API requests) version of the SDK as 0.0. |
OK, can see "userId":"C908C382-6E7C-45E1-B4DD-B26FA952EA99","v":"0.0.0", 30th successful run |
Ok, we've just done 60 consecutive starts without a hang. This is about 40 more than we have managed in the past. This looks good to me. Rob |
I suppose the next question is, what other testing is needed and when can a new 'official' build be released? Rob |
I'll push this live Monday |
OK, thanks very much for all the help getting this resolved. We're back at work and will continue testing today. |
Is 6.2.6 the new version to use for this problem? Rob |
Hi, yes it's 6.2.6 |
@shaders |
We haven't tested on iOS 10 yet, only iOS 8 and iOS 9. 6.2.6 works there. However we don't do register and unregister in our app, just the register. We're out of the office until tomorrow (Weds) and so can't do IOS 10 until then. Rob |
@zarko-tg please see this thread regarding unregister/register, it might be iOS10 bug: |
We've now tested on IOS 10 and it seems to work OK. Rob |
👍 |
We upgraded to PushWoosh 6.2.1 a few weeks ago and are still testing the upgrade.
We appear to be getting
at the start of our app from PushWoosh. This is only occurring once every 10-15 times.
Since the app crashes its difficult to debug it further.
The error message we get is
When the app starts up correctly, we don't get the
We're struggling to work out what to do here as we never even get the deviceReady event (or $ionicPlatform.ready in our case). Its difficult to do anything.
Its definitely intermittent as we can start the app again and it will work.
Google has not helped here.
Any advice welcomed,
Thanks
Rob
The text was updated successfully, but these errors were encountered: