Code Monkey home page Code Monkey logo

Comments (16)

mariohmol avatar mariohmol commented on June 2, 2024

Totally intermitent , trying to remove some html and run again.. sometime loads at first time. some time not.. some times have to open incognito like 5 times to make the error appear.. =(

really lost here.. now trying to move temporally to without ssr cause is on production

@clbond has an idea on how / where to put breakpoints and do some checkings?

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

I figure it out... basicly i changed my app to be feature style, so i have a bunch of angular modules..

have been working in this style for a month.. and now i got this error and saw that i included a cycle reference...

was a module calling a service for other modules that was not included as a shared

using ng serve it was working always.. and in ssr was intermitent..

anyways.. so far so good!! thanks

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

I continue with this issue.. dont know what to do.. 3 days in a row ... testing all day long.. could not make progress.. will drop ssr for now =(

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

Hi.. OMG.. i tested so many things.. i think that the last thing that i changes.. was something related to cache and providing app.js ... for some reason the app.js was returning a HTML and not a JS..

and now everything makes sense.. why this was intermitent... as some times app.js was not coming.. this was taking the HTML coming from the server and removing it... because was missing the app.js

so.. in the future.. if you have an issue where the page loads and disappear.. now that it might be app.js that was missing

hope not having to reopen this akakakak

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

Sorry... but still having this issue... had to disable ssr to make it work =( .. it works perfect without the ssr

as I said is intermitent.. at least on chrome.. i just saw the in firefox always gives this error... load the html from the / request and after loads the app.js it removes everything from <aplication

no erros in browser console or express (server side...) .. so really blind here

if you would like to have access to a live version with the error.. please send me a email

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

When i remove builder.preboot(true) it seems to be working again..

from angular-ssr.

misticwonder avatar misticwonder commented on June 2, 2024

I have the same error. How to fix preboot? What version of preboot can we use with ssr?

from angular-ssr.

ktersius avatar ktersius commented on June 2, 2024

I experienced something similar, it goes away if you do a hard refresh or disable caching in chrome devtools. I think it is some sort of timing issue because if you throttle the chrome speed in dev-tools all seems to work again.

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

@ktersius indeed.. i experienced the same.. but even ith hard refresh.. some times it gave me the same error.. did u try to remove the preboot to see if that goes away?

from angular-ssr.

clbond avatar clbond commented on June 2, 2024

This may mean your application is failing to boot properly. At startup, we create a second root <application> (eg) element and once it is populated with rendered content, preboot hides the server-provided root tag and makes visible the client-built one. If it is disappearing, I would try debugging your application bootstrap process. And where are you calling preboot.complete() from?

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

Thanks for answering! Is this correct?

const { prebootClient } = require('preboot/__build/src/browser/preboot_browser');
export class AppModule {
  constructor(router: Router, zone: NgZone) {
    if (typeof prebootstrap === 'undefined') {
      return;
    }

    const finished = Observable.combineLatest(router.events, zone.onMicrotaskEmpty);

    const subscription = finished.subscribe(([event, stable]) => {
      if (stable === false) {
        return;
      }

      switch (true) {
        case event instanceof NavigationError:
        case event instanceof NavigationEnd:
          setImmediate(() => prebootClient().complete());

          subscription.unsubscribe();
          break;
        default:
          break;
      }
    });
  }
}

from angular-ssr.

misticwonder avatar misticwonder commented on June 2, 2024

This problem only in chrome browser with browser cache enabled.

from angular-ssr.

clbond avatar clbond commented on June 2, 2024

Can I have access to your code? Are there uncaught exceptions being thrown (either on the server or the client)? It's impossible for me to debug without the code.

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

Hi.. yes i know.. its hard.. but is no errors at all.. if you would like to.. we can do a call and i show you what is happening.. there is my email in my profile.. just let me know

from angular-ssr.

clbond avatar clbond commented on June 2, 2024

I have removed setImmediate from the example. Can you tell me if this fixes your issue? Perhaps you are using a browser that doesn't support setImmediate

from angular-ssr.

mariohmol avatar mariohmol commented on June 2, 2024

Guys, i'm not experiencing this anymore.. even putting preboot back... thanks anyway =)

from angular-ssr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.