-
Notifications
You must be signed in to change notification settings - Fork 64
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
TypeError: undefined is not an object (evaluating 'window.codePush.reportStatus') #31
Comments
This appears to be an issue when the CodePush TS/JS library is not loaded at the time when the native plugin attempts to register the Since Capacitor does not guarantee the client JS code is loaded until the application imports the CodePush libraries (unlike Cordova which loads all plugin code up front), we will need to provide deferred callback support in the platform reporting managers:
Something like this (I'm not sure of the syntax needed, I think this is wrong but the intent is right.):
Then in
|
@leo6104 What do you think? |
As a workaround. CodePush needs to be loaded immediately on App start. (I've done this in the Angular root app TypeScript file.) But this is not ideal since it increases the initial JS bundle size and app load times. (Bad for PWAs & user experience.)
|
@lincolnthree sorry for pinging about a different issue, but it seems your input might be valuable in #21
Please let us know whether you experience such issue on iOS. It would let us know there whether issue is related to our own setups, or it's not working for everyone. |
@o-alexandrov It does actually happen on iOS. I've amended my issue report. |
@o-alexandrov BTW. It's probably better to actually ping me in the issue you'd like me to look at, rather than convolute the discussion of another topic. The topic you're interested in is unrelated other than the platform is may occur on, which I'm not sure is a really strong 'link'. Lots of platform specific bugs occur in hybrid codebases due to the double coding required to support each platform. |
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Description
I'm not sure why this is happening, but a small subset of devices the codePush instance seems unavailable in the window context. Possibly a timing issue? This is strange though because our app waits a solid 4-5s before attempting any CodePush actions.
Reproduction
No reproduction available currently. Just production logging messages.
Additional Information
(The more info the faster we will be able to address it!)
The text was updated successfully, but these errors were encountered: