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

Cannot read property 'onSyncStatusChanged' of undefined #39

Open
vinz-mehra opened this issue Jul 10, 2021 · 3 comments
Open

Cannot read property 'onSyncStatusChanged' of undefined #39

vinz-mehra opened this issue Jul 10, 2021 · 3 comments

Comments

@vinz-mehra
Copy link

I am trying to implement CodePush functionality on my app. Followed the readme tutorial line by line but I am receiving the following error

Uncaught (in promise): TypeError: Cannot read property 'onSyncStatusChanged' of undefined
TypeError: Cannot read property 'onSyncStatusChanged' of undefined

Project Info

Ionic:

Ionic CLI : 6.16.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.8
@angular-devkit/build-angular : 12.0.2
@angular-devkit/schematics : 12.0.2
@angular/cli : 12.0.2
@ionic/angular-toolkit : 4.0.0

Capacitor:

Capacitor CLI : 3.0.0
@capacitor/android : 3.0.1
@capacitor/core : 3.0.0
@capacitor/ios : not installed

@Clovel
Copy link

Clovel commented Jul 16, 2021

Have you defined a onSyncStatusChanged function and added it to you syncOptions object (parameter for sync method) ?

I think the issue here is that syncOptions are marked as optional, but perhaps a check is missing.

Try using a complete sync call with all available arguments.

@Clovel
Copy link

Clovel commented Sep 20, 2021

Did it work for you @vinz-mehra ?

Clovel added a commit to loginline/capacitor-codepush that referenced this issue Sep 20, 2021
…cking syncOptions?.onSyncStatusChanged

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to loginline/capacitor-codepush that referenced this issue Sep 20, 2021
…cking syncOptions?.onSyncStatusChanged

Signed-off-by: Clovis Durand <[email protected]>
@Clovel
Copy link

Clovel commented Sep 20, 2021

I think I found the source of the issue. Se PR #51. There is a strong probability that onSyncError failed too before this fix.

Clovel added a commit to loginline/capacitor-codepush that referenced this issue Sep 20, 2021
…syncOptions?.onSyncError

Signed-off-by: Clovis Durand <[email protected]>
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

2 participants