swiss-army-knife-card icon indicating copy to clipboard operation
swiss-army-knife-card copied to clipboard

DevTools failed to load source map: Could not load content for https://REDACTED.com/local/community/swiss-army-knife-card/dist/svg-injector.map.js: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Open johntdyer opened this issue 1 year ago • 4 comments

Bug report notice

I have reloaded the resources but I constantly getting this 404 since installing

So make sure your problem is not related to that!

  • [X ] Yes, I'm sure that it is not a configuration mistake

Bug description

Just installed the card, not even using yet, and I;m getting a 404 for some asset

I can see this file its looking for does not exist in the dir

➜  swiss-army-knife-card ls -al
total 244
drwxr-xr-x    2 root     root          4096 Sep 30 11:35 .
drwx------   86 root     root          4096 Sep 30 11:35 ..
-rw-r--r--    1 root     root         17722 Sep 30 11:35 SVGInjector.min.js
-rw-r--r--    1 root     root          5170 Sep 30 11:35 SVGInjector.min.js.gz
-rw-r--r--    1 root     root         16090 Sep 30 11:35 sak-css-definitions.yml
-rw-r--r--    1 root     root         20636 Sep 30 11:35 sak-svg-definitions.yml
-rw-r--r--    1 root     root           183 Sep 30 11:35 sak_templates.yaml
-rw-r--r--    1 root     root        137333 Sep 30 11:35 swiss-army-knife-card.js
-rw-r--r--    1 root     root         26808 Sep 30 11:35 swiss-army-knife-card.js.gz

but I can see that its being called from SVGInjector.min

➜  swiss-army-knife-card grep 'svg-injector.map.js' *
SVGInjector.min.js://# sourceMappingURL=./dist/svg-injector.map.js
➜  swiss-army-knife-card

To Reproduce

Steps to reproduce the behavior: refresh lovelace

Expected behavior

no 404

Screenshots

Desktop browser (please complete the following information):

  • OS: OSX
  • Browser Chrome and Firefox
  • Version 103

Additional context Add any other context about the problem here.

(Optional): Suggested Solution

Any suggested solution to this bug.

johntdyer avatar Sep 30 '22 15:09 johntdyer

As mentioned in the comments of #161, I resolved this by downloading the svg-injector.map.js file from the svg-injector project and placing it in the required location. I have a suspicion that @AmoebeLabs maybe neglected to add the file when prepping the rc3 release? Not sure, but its a simple fix. For reference, the file is is over here

PeterGrace avatar Oct 08 '22 00:10 PeterGrace

are you using?

  • https://github.com/flobacher/SVGInjector2 or
  • https://github.com/iconic/SVGInjector

peteralv avatar Oct 14 '22 08:10 peteralv

@peteralv I just tested both of them and both seem to work; I had originally been using iconic/SVGInjector but flobacher/SVGinjector2's file also seems to work interchangeably (unless I'm not reloading properly to see the difference.)

PeterGrace avatar Oct 14 '22 19:10 PeterGrace

Thanks 🙏 Peter

Skickat från min iPhone

14 okt. 2022 kl. 21:37 skrev Peter Grace @.***>:



@peteralvhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpeteralv&data=05%7C01%7C%7Ce0e8d2e148d74c1eaa4408daae1b76a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638013730216088871%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cJ5VY%2BryjL6i2h0GHIsrt4Q1oLH8xNbYtBm%2FmCBR%2BLE%3D&reserved=0 I just tested both of them and both seem to work; I had originally been using iconic/SVGInjector but flobacher/SVGinjector2's file also seems to work interchangeably (unless I'm not reloading properly to see the difference.)

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAmoebeLabs%2Fswiss-army-knife-card%2Fissues%2F168%23issuecomment-1279385601&data=05%7C01%7C%7Ce0e8d2e148d74c1eaa4408daae1b76a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638013730216088871%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Evu3%2FWgkZyLXL3VIfcMfotAg%2Fy8SGT63H4rHUesiXbE%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE5TAW5SCCRNMYRVD4UXABDWDGY5ZANCNFSM6AAAAAAQZ4V5XA&data=05%7C01%7C%7Ce0e8d2e148d74c1eaa4408daae1b76a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638013730216088871%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KhuS6AsBtgGn6zVXyYXeci%2B1uJgPSw9nCiPdEVvWHsI%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

peteralv avatar Oct 17 '22 05:10 peteralv