Base solution for your next web application
Open Closed

browser not loading index content after pulling project from git server #11548


User avatar
0
best4bps created

Hello everyone,

we were just getting started with asp.net Zero Core Angular (merged Solution) and following the guide and everything was working perfectly for me up until the end of the page (https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Getting-Started-Angular-Merged)

However, two of my collegues are experiencing issues when trying to start the webserver by using npm start. The console reports that the local server is listening on port:4200 but whenever they try browsing with http://localhost:4200, they don't even get any error, it's just the index page loading endlessly without any response.

The only difference between me and them is that I set up the project through the demo download and pushed it to our git server for them to pull the code. It seems that this is also the reason it doesn't work as expected. Can aynone provide a quick fix, given these information or do I need to provide further details?

Best Regards best4bps


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @best4bps

    Demo project shouldn't cause such a problem. Could you take a screenshot of the browser console and share it with us ?

    Thanks,

  • User Avatar
    0
    best4bps created

    Hey @ismcagdas,

    i can't provide a screenshot right now but I got the following error message upon inspecting the browser from my colleagues with F12: "Cross-Origin Request Blocked: The Same-Origin Policy disallows reading the remote resource at https://localhost:5001/AbpUserConfiguration/GetAll?d=1681805995669. (Reason: CORS request failed). Status code: (null)."

    EDIT: We have made some further investigations and found out that this problem (with the same occuring error code) is only coming up when we pull the project from git rather than creating the project by ourself (from web.sln). What could possibly be the reason for that?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @best4bps

    Do you pull your own project or https://github.com/aspnetzero/aspnet-zero-core ? If it is your own project, do you see any error logs when you run the Host project ? You can find logs under App_Data/Logs folder.

  • User Avatar
    0
    best4bps created

    No we are pulling our own project from our own git server. The process is the following:

    Download demo project -> Initilize and Build project -> Check if everything wokrs -> Push to git server -> Everyone else pulls

    As I said the only one who is able to load http://localhost:4200 is the person who downloaded the demo project and pushed the code.

    Also unfortunately there arent any errors. The only error is CORS as mentioned above.

    I will try to comapre both of the repositories with each other because there must be some inherent difference somewhere which prevents the others from loading the page and getting the CORS error.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @best4bps

    If you haven't solve this problem yet, we can arrange an online metting and check this problem on your end. Please send an email to [email protected] if you haven't solve this problem yet.

    Thanks,