question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sequential call causes wrong .js path

See original GitHub issue

Actual Behavior

We see calls to the .js files being requested on sub directories and api endpoints. When using a browser, this doesn’t seem to happen, bot search engines or other bots can cause this.

Expected Behavior

The .js files exist on the root, so should always be called on root.

Steps to Reproduce the Bug

Steps to reproduce the behavior:

  1. Checkout intershop-pwa
  2. Build the site with docker with the default ICM_BASE_URL
  3. Open the site via localhost, e.g. http://localhost:4300
  4. Open one of the demo pages, e.g. http://localhost:4300/Acer/Acer-ICONIA-W500P-%2B-Keydock-sku10957684-catComputers.897.897_Acer?view=grid
  5. Hit refresh several times. The log in the console should be ‘normal’ and contain .js files like GET /main.0e80287f29ca0cba7f99.js 200 330820 - 3.958 ms
  6. Next use a tool like siege to call the same URL.
  7. The first request to the page will show the same loggin, but when the second, third, etc visit is triggered, the path to the files change: siege -t5s -c1 http://localhost:4300/Acer/Acer-ICONIA-W500P-%2B-Keydock-sku10957684-catComputers.897.897_Acer\?view\=grid SSR /Acer/main.0e80287f29ca0cba7f99.js
  8. Another example: siege -t5s -c1 http://localhost:4300/page/page.privacyPolicy.pagelet2-Page ERROR Http failure response for https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/cms/pages/main.0e80287f29ca0cba7f99.js: 404 Not Found

Environment Details

  • Desktop:

    • OS: Ubuntu 20.20
    • Docker in Terminal
    • 0.28.0

Additional Context, like Screenshots, Log File Snippets etc.

SSR /Acer/Acer-ICONIA-W500P-%2B-Keydock-sku10957684-catComputers.897.897_Acer?view=grid
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/10957684?allImages=true 200 19564 - 149 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/10957684/links 200 1520 - 232 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 361 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories/Computers/897/897_Acer 200 2244 - 374 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories?imageView=NO-IMAGE&view=tree&limit=2&omitHasOnlineProducts=true 200 130712 - 430 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/cms/includes/include.dialog.readyForShipment.pagelet2-Include 200 9402 - 287 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories/Computers/897 200 21072 - 224 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/10696946?allImages=true 200 19388 - 260 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/7918682?allImages=true 200 5882 - 316 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories/Computers 200 16760 - 300 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/5920217?allImages=true 200 19516 - 363 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/products/8899566?allImages=true 200 20582 - 373 ms
RES 200 /Acer/Acer-ICONIA-W500P-%2B-Keydock-sku10957684-catComputers.897.897_Acer?view=grid
GET /Acer/Acer-ICONIA-W500P-%2B-Keydock-sku10957684-catComputers.897.897_Acer?view=grid 200 207394 - 853.745 ms
SSR /Acer/main.0e80287f29ca0cba7f99.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 151 ms
RES 404 /Acer/main.0e80287f29ca0cba7f99.js
GET /Acer/main.0e80287f29ca0cba7f99.js 404 12667 - 492.240 ms
SSR /Acer/vendor.2dcf650556e821b23289.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 173 ms
RES 404 /Acer/vendor.2dcf650556e821b23289.js
GET /Acer/vendor.2dcf650556e821b23289.js 404 12673 - 483.965 ms
SSR /Acer/polyfills.efe1c9a4d455f9af5703.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 152 ms
RES 404 /Acer/polyfills.efe1c9a4d455f9af5703.js
GET /Acer/polyfills.efe1c9a4d455f9af5703.js 404 12682 - 478.675 ms
SSR /Acer/runtime.ee14c3e624fb5cfe0cb8.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 158 ms
RES 404 /Acer/runtime.ee14c3e624fb5cfe0cb8.js
GET /Acer/runtime.ee14c3e624fb5cfe0cb8.js 404 12676 - 480.909 ms
SSR /page/page.privacyPolicy.pagelet2-Page
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 240 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/cms/pages/page.privacyPolicy.pagelet2-Page 200 12626 - 254 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories?imageView=NO-IMAGE&view=tree&limit=2&omitHasOnlineProducts=true 200 130712 - 332 ms
RES 200 /page/page.privacyPolicy.pagelet2-Page
GET /page/page.privacyPolicy.pagelet2-Page 200 89641 - 531.319 ms
SSR /page/main.0e80287f29ca0cba7f99.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 221 ms
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories?imageView=NO-IMAGE&view=tree&limit=2&omitHasOnlineProducts=true 200 130712 - 280 ms
ERROR Http failure response for https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/cms/pages/main.0e80287f29ca0cba7f99.js: 404 Not Found
RES 200 /page/main.0e80287f29ca0cba7f99.js
GET /page/main.0e80287f29ca0cba7f99.js 200 80410 - 512.763 ms
SSR /page/main.0e80287f29ca0cba7f99.js
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/configurations 200 3818 - 171 ms
ERROR Http failure response for https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/cms/pages/main.0e80287f29ca0cba7f99.js: 404 Not Found
GET https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS-Site/rest;loc=en_US;cur=USD/categories?imageView=NO-IMAGE&view=tree&limit=2&omitHasOnlineProducts=true 200 130712 - 309 ms
RES 200 /page/main.0e80287f29ca0cba7f99.js

AB#65696

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jometznercommented, Mar 20, 2021

@dhhyi sure go ahead. Thanks for letting us know.

1reaction
dhhyicommented, Mar 20, 2021

@jometzner Let me have a look at this, as this correlates with a feature we need for our project. @127001 Thanks for showcasing siege, I did not know this tool before. Really neat 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling executing callbacks in sequential order
I am trying to execute following array (avoid callbackHell) of functions in a sequential order implementing function runCallbacksInSequence (I ...
Read more >
Handling common JavaScript problems - MDN Web Docs
Let's get to work. The error is now being thrown at line 51. Click on line number 51 in the center panel to...
Read more >
Top 10 Most Common Node.js Developer Mistakes - Toptal
Often, reasons for such criticisms are rooted in how developers use/misuse the language. This article explores ten common mistakes that Node.js developers ...
Read more >
A Comprehensive Guide To Error Handling In Node.js
Bad parameters when calling a function. Reference errors when you misspell a variable, function, or property name. Trying to access a location ......
Read more >
Complete Guide to Express Middleware - Reflectoring
A basic understanding of Node.js and components of the Express framework is ... They are arranged in a chain and are called in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found