-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Dev build not working correctly - Platform.ready not firing #9944
Comments
How slow are we talking here? What is the diff from when it was faster? Did you change anything related to your environment besides upgrading to Thanks, |
You may be able to at least work around the problem by increasing the |
@danbucholtz I can confirm, that the dev build of my app takes 5 (up to 10) seconds to load on my android device (which causes an asset load error) - compared to the prod version which takes less than a second on the very same device. No changes to the code of the app. |
@danbucholtz I could send you the source of our app via mail, since I am not allowed to make the repo public. |
I confirm that in app-scripts 1.0.0 app is loading much slower than in 0.0.45, but prod mode solve this problem. |
@rapropos that is not really an ideal workaround, and should be avoided. |
It sounds like this is working as expected, then. Development builds will be slower than prod builds because they don't use the ahead-of-time compiler. I'm going to close this issue but will revisit if needed. Thanks, |
@danbucholtz Seriously?? not trying to be snarky here, but I'm having a hard time understanding how you can close this issue with "works as expected". Development builds breaking -- no way to run a development build on a device -- that's "works as expected" to you?? My deviceready fires after about 7-8 seconds, as you should see in the above screenshot. Meanwhile, the platform.ready() call fails, causing whitescreen. Incidentally, @rapropos I did try your solution of defining the LoadUrlTimeoutValue explicitly to 20000, however I should note that by default it should already be set to 20000, and it did not make any difference. I suspect that perhaps app load and deviceReady/platformReady are perhaps not affected by this preference. All that said -- I do not know precisely what the problem is -- not sure why the deviceReady firing slowly would cause a total app meltdown -- but I do know that it used to work and now it doesn't. Perhaps the slow build is not in fact the culprit. But I'd really like to get to the bottom of this so I can actually develop my app on the device, preferably with livereload so I don't have to wait 40 seconds for my build for every tiny change. If someone at Ionic could help us get there, that would be great. Is there an option, for instance, to get the dev builds to use the AoT compiler? I don't mind waiting longer for the initial build if it means I can get livereload working. Any help tracking this down appreciated. Thanks, |
At the risk of incurring further @mhartington wrath,
When I ran into this problem, I bumped it to 800000, which at least allowed the app to launch and be debuggable, which was really what I needed at the time. |
Try If there is an issue here with ionic or app-scripts, we can look into it but it sounds like the app is just starting up slowly. That'll happen with Android when using development builds. Thanks, |
same issue with The app is not "just starting up slowly" -- the dev build is 100% broken. Perhaps the title of the issue is misleading. I thought it might be the slow loading which was causing the breakage, but it is possibly not the slow loading. If it just loaded slowly, I would be fine. But the dev builds are BROKEN. Ionic's Platform is undefined... therefore this.platform.ready() breaks the app. My understanding was that Ionic Platform encapsulated the deviceReady callback -- but, it appears that the app tries to load platform.ready() before deviceready fires (it eventually does fire). Please look at the screenshot and let me know what else I need to do to show what is happening here. It seems others are having similar problems, but nobody has proposed a solution yet. I am confused as to why this is being called "works as normal". The way it was before was "works as normal" -- because it actually worked. This is a broken dev build. Perhaps it is not due to slow loading, and therefore this issue should be closed. But if it is not slow loading, then please help me determine what the issue is so that we can fix it. Thanks, |
@marcsyp we have not been able to recreate this in our extensive testing. We've tested OSX/Windows ios and android and have not been able to create an situation where an app breaks on platform.ready. How could we replicate this? What's your app look like? Does this happen with starter project? Or is this only happening with your app? We need more information to be able to figure out whats going on. |
When I get back from this business trip I'll try to recreate in a smaller
app, or bundle up the whole thing for you to look at. Thanks for responding.
Marc
…On Jan 12, 2017 6:58 PM, "Mike Hartington" ***@***.***> wrote:
@marcsyp <https://github.com/marcsyp> we have not been able to recreate
this in our extensive testing. We've tested OSX/Windows ios and android and
have not been able to create an situation where an app breaks on
platform.ready.
How could we replicate this? What's your app look like? Does this happen
with starter project? Or is this only happening with your app? We need more
information to be able to figure out whats going on.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9944 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACzflNmOsponm5f99jC4lLcENczd67q-ks5rRtpKgaJpZM4Lf-bk>
.
|
This issue was moved to ionic-team/ionic-app-scripts#684 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ ] 1.x
[X] 2.x
I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Deviceready does not fire for at least 8 seconds in dev builds, causing the app to break (platform.ready() fails because ready does not exist on undefined). Using '--prod' works, but livereload is not available in prod builds as far as I know.
Expected behavior:
Using "ionic run android": Deviceready fires, does not time out, and app works. Livereload works.
Related code:
Platform is injected correctly and I can confirm that building with
--prod
does indeed work.Other information:
As documented in this issue, upgrading to app-scripts 1.0.0 (and CLI 2.1.18) causes slow deviceReady in dev builds. Some people only have a slow load time, in my case, my app breaks because platform.ready() fails. The proposed solution is to build with the --prod flag, but this eliminates the possibility of running dev builds on the device.
Ionic info:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.47 (downgraded from 1.0.0, still have problems)
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.4
Xcode version: Not installed
package.json:
tsconfig.json:
@mhartington as requested.
The text was updated successfully, but these errors were encountered: