Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Links of null for IonicPage and LiveReload v3 #892

Closed
jgw96 opened this issue Apr 12, 2017 · 14 comments
Closed

Links of null for IonicPage and LiveReload v3 #892

jgw96 opened this issue Apr 12, 2017 · 14 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Apr 12, 2017

From @mburger81 on April 12, 2017 9:13

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.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:
Sometimes on ionic serve using IonicPage after change a file and live reload I get this error:

Runtime Error
Cannot read property 'links' of null
Stack
TypeError: Cannot read property 'links' of null
    at setupPreloadingImplementation (http://localhost:8100/build/main.js:59537:60)
    at http://localhost:8100/build/main.js:59569:17
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14529)
    at n.run (http://localhost:8100/build/polyfills.js:3:9741)
    at NgZone.runOutsideAngular (http://localhost:8100/build/main.js:4390:76)
    at http://localhost:8100/build/main.js:59568:20

I don't know how to reproduce this, if you need an example I can try to do it.

I think the problem is on LiveReload and IonicPage, I have multi ion-nav

Expected behavior:
This should work like a sharm 😄

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

    Cordova CLI: 6.5.0 
    Ionic Framework Version: 3.0.1
    Ionic CLI Version: 3.0.0-beta.5
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Linux 4.8
    Node Version: v6.10.2
    Xcode version: Not installed

Copied from original issue: ionic-team/ionic-framework#11184

@danbucholtz
Copy link
Contributor

danbucholtz commented Apr 12, 2017

@mburger81,

This should be fixed in nightly. There may be other issues though since it isn't well tested yet.

npm install @ionic/app-scripts@nightly

Please let me know if this isn't working for you or if it creates additional issues.

Thanks,
Dan

@mburger81
Copy link
Contributor

I tested last nightly for another issue (#893 where the nightly does not resolve it), and I'm not sure if the nightly resolves me this issue! I'll test it and let you know!

@mburger81
Copy link
Contributor

@danbucholtz I can not confirm the solve of the bug, last nightly 1.3.1-201704112210 doesn't resolve me the issue! So issue is still there.

@danbucholtz
Copy link
Contributor

Can you provide a way for me to recreate the issue?

Thanks,
Dan

@mburger81
Copy link
Contributor

I have still the problem but I can not reproduce it and I have no idea how I should reproduce it, if I'm not able to understand on which situation the error occures. The error is appearing once a day, I will do my best i the next days

@mburger81
Copy link
Contributor

Hi @danbucholtz I was able to "reproduce" (I hope so) the issue.

What do you have to do to reproduce the issue, it is simple, checkout this repro https://github.com/mburger81/ionic3-app-scripts-bug.git install npm packages and run dev server

npm install
ionic serve

After load the page from browser, you'll have a page like this:
image

Now go to the src/pages/main/main.html source page and remove for example the first "<" your find without saving, and add it agian "<" now save the file. In this case you have changed nothing but you were able to save the file. No the page is reloading again automatically and no you'll have this error:

Runtime Error
Cannot read property 'links' of null
Stack
TypeError: Cannot read property 'links' of null
    at setupPreloadingImplementation (http://localhost:8100/build/main.js:56791:60)
    at http://localhost:8100/build/main.js:56823:17
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14529)
    at n.run (http://localhost:8100/build/polyfills.js:3:9741)
    at NgZone.runOutsideAngular (http://localhost:8100/build/main.js:4389:76)
    at http://localhost:8100/build/main.js:56822:20

So happy to reproduce this and to share a project with you.
As you can see we have a two level navigation, one into app.html where I load the main.html page where is the second navigation where we load the other pages. We need to do this for other reasons, which I think aren't not under discussion on this thread?

Perhaps we are implementing this in a wrong way?

The same sample project you downloaded here is also for the other issue we have #898

Let me know if you need something else and if I can help you with anything else. Thx

@philliphartin
Copy link

Why was this issue closed? I'm also experiencing the same issue

Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.4
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.3.1 Build version 8E1000a

@danbucholtz
Copy link
Contributor

@pjhartin,

Can you recreate this in @ionic/[email protected]?

Thanks,
Dan

@mburger81
Copy link
Contributor

In my case it seems to be resolved on [email protected] and [email protected]

@philliphartin
Copy link

philliphartin commented May 3, 2017

@danbucholtz Thanks for responding. I updated this morning, did a clean install of npm_modules too, and seemed to be working for a few hours until just now.
screenshot 2017-05-03 15 53 57

For legibility the output is below

Runtime Error
Cannot read property 'links' of null

Stack

TypeError: Cannot read property 'links' of null
    at setupPreloadingImplementation (http://localhost:8100/build/main.js:60280:60)
    at http://localhost:8100/build/main.js:60312:17
    at t.invoke (http://localhost:8100/build/polyfills.js:3:11562)
    at n.run (http://localhost:8100/build/polyfills.js:3:6468)
    at NgZone.runOutsideAngular (http://localhost:8100/build/main.js:4369:76)
    at http://localhost:8100/build/main.js:60311:20

Environment

Ionic Framework: 3.1.1
Ionic App Scripts: 1.3.6
Angular Core: 4.0.2
Angular Compiler CLI: 4.0.2
Node: 6.9.1
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

@mburger81
Copy link
Contributor

Perhaps it is a combination with ionici@beta (ionic-cli) whisch is beta: '3.0.0-rc.1',

@danbucholtz
Copy link
Contributor

It seems unlikely that it would be related to the CLI but I am not 100% sure.

Hmm. Every now and again this pops up, but there is never a good way to recreate it and resolve it. Were you able to move past the issue, or do you have a way to recreate it?

Thanks,
Dan

@mburger81
Copy link
Contributor

For us the bug is not occur anymore on cli3, so for the moment we are not able to reproduce it. If we are able to reproduce it on dev we will for sure try to recreate a repo. But honestly I hope this is not happening 😄

@mburger81
Copy link
Contributor

Okay I have to revert my post from the morning.
From this morning we have back the issue. If we are able to reproduce it we will share it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants