App not loading on chrome with ionic server

App not loading on chrome with ionic server

av Peter Power -
Antall svar: 16

Hi, yesterday i decided to start working on mm2.


I first tried the phonegap build to keep developing as i did with mm1 but i was not able to reflect my changes on build files.

So i start using ionic CLI followinf steps on https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2 without touching a single line of code, everything was looking good but when i start the server i get a blank page and all i see on the console is:

'webkitIDBRequest' is deprecated. Please use 'IDBRequest' instead.
$mmInitDelegateProvider: Registered process 'mmAppInit'.
$mmInitDelegateProvider: Registered process 'mmUpdateManager'.
30/7/2015, 10:44:59 $mmInitDelegate: Executing init process 'mmAppInit'
30/7/2015, 10:44:59 $mmInitDelegate: Executing init process 'mmUpdateManager'


I tried looking for a solution but i've not able to find anything.

Any hint on what i'm doing wrong or how to develop using phonegap build?


Thanks

Gjennomsnittlig vurdering: -
Som svar til Peter Power

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Hi,

Peter, can you try the following?

- git pull (update to the latest master code)

- bower install

- gulp

- Open the chromium browser with the special flags

- ionic serve -w chromium

Regards, Juan

Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Peter Power -
i cloned it from git this morning, so the pull says that code is up to date.
i made all the steps without problem but still got a blank prowser page.

i also made a brand new installation of cordova, ionic, bower and gulp and i got missing plugins (statusbar, webintent and documenthandler) from git.

the only thing is that, even trying to download chromium, i still need to use "chrome" in command line (the app is launched on pre-opened chromium instance anyway). may this be a problem?
Som svar til Peter Power

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

That shouldn't be the problem, since in case chrome was not correctly opened you will see errors only when you try to connect to a site.

Can you share with us the complete project directory zipped?

I will try to run your version in my environment (my email is juan AT moodle.com)

Regards, Juan

Som svar til Peter Power

Re: App not loading on chrome with ionic server

av Frédéric Massart ⭐ -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

Hi Peter,


You don't seem to be doing anything wrong, except maybe that you are using the development version and not the latest tag, but still that should not do that.


Not being sure what exactly is happening, could you please try to comment:


$mmInitDelegateProvider.registerProcess('mmUpdateManager', '$mmUpdateManager.check', mmInitDelegateMaxAddonPriority + 300, true);


in www/core/main.js.


Then try again to launch the server.


By the way, you should see a lot more debugging messages. Example:


'webkitIDBRequest' is deprecated. Please use 'IDBRequest' instead.
mm.bundle.js:1637 $mmInitDelegateProvider: Registered process 'mmAppInit'.
mm.bundle.js:1637 $mmInitDelegateProvider: Registered process 'mmUpdateManager'.

mm.bundle.js:5036 $mmCoursesDelegateProvider: Registered addon 'mmCourse' as navibation handler.
mm.bundle.js:1637 $mmInitDelegateProvider: Registered process 'mmLogin'.
mm.bundle.js:5700 $mmUserDelegateProvider: Registered component 'mmaGrades:viewGrades' as profile handler.
mm.bundle.js:5036 $mmCoursesDelegateProvider: Registered addon 'mmaGrades' as navibation handler.
mm.bundle.js:5700 $mmUserDelegateProvider: Registered component 'mmaMessages:sendMessage' as profile handler.
mm.bundle.js:5700 $mmUserDelegateProvider: Registered component 'mmaMessages:addContact' as profile handler.
mm.bundle.js:5700 $mmUserDelegateProvider: Registered component 'mmaMessages:blockContact' as profile handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModAssign' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModBook' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModChat' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModChoice' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModFolder' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModForum' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModImscp' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModLabel' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModPage' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModResource' as course content handler.
mm.bundle.js:4908 $mmCourseDelegateProvider: Registered addon 'mmaModUrl' as course content handler.
mm.bundle.js:5700 $mmUserDelegateProvider: Registered component 'mmaNotes:addNote' as profile handler.
mm.bundle.js:5036 $mmCoursesDelegateProvider: Registered addon 'mmaNotes' as navibation handler.
mm.bundle.js:5036 $mmCoursesDelegateProvider: Registered addon 'mmaParticipants' as navibation handler.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer e856fe74e4ee5c24796230f420538584 listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 1b6e88943592a9d7cb34771fb53ab592 listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer d0a49237ad5206837df1520be0272976 listening to event session_expired
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmURLDelegate: Register observer 'mmLoginSSO' for custom URL.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer f63b7d0385d547f8859dead38f9543e1 listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer edfa4ccabaa21ca392990aaf65adddc7 listening to event site_updated
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmSideMenuDelegate: Register plugin 'mmaCalendar' in side menu with priority 400
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmLocalNotifications: Register observer 'mmaCalendarEvents' for notification click.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmSideMenuDelegate: Register plugin 'mmaFiles' in side menu with priority 200
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmSideMenuDelegate: Register plugin 'mmaFrontpage' in side menu with priority 1000
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmSideMenuDelegate: Register plugin 'mmaMessages' in side menu with priority 600
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 5501655b6e57a4ebda0f2cd187f88410 listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmPushNotificationsDelegate: Registered handler 'mmaMessages' as push notification handler.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmModuleActionsDelegate: Registered handler 'mmaModAssign' as module handler.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmModuleActionsDelegate: Registered handler 'mmaModForum' as module handler.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmSideMenuDelegate: Register plugin 'mmaNotifications' in side menu with priority 800
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmPushNotificationsDelegate: Registered handler 'mmaNotifications' as push notification handler.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 43cae95502cd07483e1e6bf892cc862a listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmLocalNotifications: Register observer 'mmaPushNotifications' for notification click.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 3c8c704f5afa1a8ee885f0242ac7ae5d listening to event site_added
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 9ab764fb71dadfd6264bcca1a1f242de listening to event site_updated
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 0c8dc32ce97441162e91f88f293ab102 listening to event login
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmEvents: Observer 61a44059fb747366d60a445a2a297449 listening to event logout
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmInitDelegate: Executing init process 'mmAppInit'
ionic.bundle.js:20434 30/7/2015 7:07:55 pm mmLogin: Forbidding state change to 'mm_login.site'. App is not ready yet.
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmInitDelegate: Executing init process 'mmUpdateManager'
ionic.bundle.js:20434 30/7/2015 7:07:55 pm $mmInitDelegate: Executing init process 'mmLogin'

Som svar til Frédéric Massart ⭐

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Hi,

can you do and additional test?

Please, can you copy the code between the lines 10 and 36 inside your index.html head tag?

https://github.com/moodlehq/moodlemobile/blob/master/index.html#L10

This will display an alert message with the javascript error

After applying those changes, remember to stop ionic serve, and run gulp again (to avoid caching issues)

Regards, Juan


Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Claudio ancooor -

Hi all,


I'm having exactly the same problem.

Could be generated by ionic 1.0.1?

Som svar til Claudio ancooor

Re: App not loading on chrome with ionic server

av Frédéric Massart ⭐ -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

Could you check the 'Network' panel of your web inspector?

Som svar til Frédéric Massart ⭐

Re: App not loading on chrome with ionic server

av Claudio ancooor -

Hi Freédéric,

attached the PS of the network inspector. If you need the .har file, I have to send it by mail (2MB).

Thanks

Vedlegg Network.png
Som svar til Claudio ancooor

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Hi,

in order to try to reproduce your problems, which operating system and version are you using?

Regards, Juan

Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Claudio ancooor -

Hi Juan,

Windows 8.1 Pro x64, Google Chrome 44.0.2403.125 m

I tried it also on Windows 7 x64.

Thanks, Claudio

Som svar til Claudio ancooor

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Thanks,

can you both try to run the Ionic getting started project?

http://ionicframework.com/getting-started/

So we can see if it's a problem located in our app

Regards, Juan

Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Claudio ancooor -

Hi Jaun,

yes, Ionic works properly. I developed other apps with it.

I think that the problem is connected to node or gulp.

Do you ever tried on a x64 PC?

I tried also on a Mac and it works properly, so I think that is very difficult to understand the problem.

In case of news, I will inform you.

Thanks,Claudio


Som svar til Peter Power

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

We found the problem,

please, follow this issue: https://tracker.moodle.org/browse/MOBILE-1143

Regards, Juan

Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Juan Leyva -
Bilde av Core developers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Can you apply the changes from this diff:

https://github.com/moodlehq/moodlemobile2/compare/master...jleyva:MOBILE-1143

And then:

npm install gulp-slash
gulp
ionic serve

The app should work for you now

Cheers, Juan

Som svar til Juan Leyva

Re: App not loading on chrome with ionic server

av Peter Power -
Sorry i've been not able to work on it for last few days.


Anyway i'm glad to see u got a fix that works like a charm.

Thank you all for your help.