Base solution for your next web application
Open Closed

Angular UI can no longer connect to Host API #7254


User avatar
0
abrewer created

After attempting to get multi tenancy working via URL, i have somehow "broken" my angular project. (Hosted as sperate docker containers within Azure (one for angularUI and another for HostAPI)) I have reverted all of my changes, but I am still getting the following error when attempting to browse to my angular site.

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at rm (main.49118b8c2f617af10825.js:1)
    at main.49118b8c2f617af10825.js:1
    at t.invoke (polyfills.80be5f6d927a95a00d1b.js:1)
    at Object.onInvoke (main.49118b8c2f617af10825.js:1)
    at t.invoke (polyfills.80be5f6d927a95a00d1b.js:1)
    at e.run (polyfills.80be5f6d927a95a00d1b.js:1)
    at e.run (main.49118b8c2f617af10825.js:1)
    at e.bootstrapModuleFactory (main.49118b8c2f617af10825.js:1)
    at zA (main.49118b8c2f617af10825.js:1)
    at Module.zUnb (main.49118b8c2f617af10825.js:1)

9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Can you share your angular website URL?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share content of appconfig.production.json of your Angular app ?

    Thanks,

  • User Avatar
    0
    mac created

    I'm having the exact same error, this is a first time deploy. In this case, it's self hosted, and the angular application is in the same IIS web app.

    This is with ANZ 7.0, Windows Server 2016.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @abrewer, @mac

    Are you using Merged project ? If so, could you share a sample project with [email protected] ?

    Thanks,

  • User Avatar
    0
    abrewer created

    I’m not using a merged project. i have seperate projects and docker containers for the host and angular apps.

    oddly enough, everything was working fine a week ago. starting 7/3 newly built container images give the aforementioned error message.

  • User Avatar
    0
    mac created

    For us, the projects are developed separately, and then merged at the end. That compiled solution being deployed is around 46 megs, not sure it will fit in email.

    FWIW, we haven't changed anything at all, first efforts are around CI/CD :)

  • User Avatar
    0
    mac created

    We're completely blocked by this issue, what can be done?

    Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at rm (main.59aa48947dbf150152e1.js:1) at main.59aa48947dbf150152e1.js:1 at t.invoke (polyfills.b90e79c26d150fdebb27.js:1) at Object.onInvoke (main.59aa48947dbf150152e1.js:1) at t.invoke (polyfills.b90e79c26d150fdebb27.js:1) at e.run (polyfills.b90e79c26d150fdebb27.js:1) at e.run (main.59aa48947dbf150152e1.js:1) at e.bootstrapModuleFactory (main.59aa48947dbf150152e1.js:1) at OA (main.59aa48947dbf150152e1.js:1) at Module.zUnb (main.59aa48947dbf150152e1.js:1)

  • User Avatar
    0
    abrewer created

    ASPNetZero support team, can you please update us as to your plan of action to address this? Thanks

  • User Avatar
    0
    abrewer created

    Update! I fixed my problem.

    I am using Azure Dev ops for CI\CD. Our build pipleline was using NPM Install, it was working, but all of a sudden quit last week. After removing the NPM Install step and replacing it with YARN (In Preview). The resulting container images starting working. I presume NPM Install was not accuratly resolving the dependencies.