-
Notifications
You must be signed in to change notification settings - Fork 307
Dev build not working correctly - Platform.ready not firing #684
Comments
From @danbucholtz on January 10, 2017 22:43 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, |
From @rapropos on January 11, 2017 0:25 You may be able to at least work around the problem by increasing the |
From @tobiasmuecksch on January 11, 2017 7:47 @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. |
From @tobiasmuecksch on January 11, 2017 7:53 @danbucholtz I could send you the source of our app via mail, since I am not allowed to make the repo public. |
From @pawelfrydrych on January 11, 2017 9:2 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. |
From @mhartington on January 11, 2017 14:41 @rapropos that is not really an ideal workaround, and should be avoided. |
From @danbucholtz on January 11, 2017 15:31 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, |
From @marcsyp on January 11, 2017 23:59 @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, |
From @rapropos on January 12, 2017 0:22
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. |
From @danbucholtz on January 12, 2017 16:22 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, |
From @marcsyp on January 13, 2017 0:14 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, |
From @mhartington on January 13, 2017 1:58 @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. |
From @marcsyp on January 13, 2017 5:48 When I get back from this business trip I'll try to recreate in a smaller Marc On Jan 12, 2017 6:58 PM, "Mike Hartington" [email protected] wrote:
|
Please provide more info and a basic repository to recreate the issue. Thanks, |
Thanks Dan -- still working under a deadline to get something pushed out by Wednesday EOD, but I intend to put together something on this when I have a chance. |
Since we use issues as an active backlog, we are starting to close inactive issues. Please provide a reproduction and open a new issue if you want us to revisit this issue. Thanks, |
From @marcsyp on January 10, 2017 22:35
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.
Copied from original issue: ionic-team/ionic-framework#9944
The text was updated successfully, but these errors were encountered: