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.

Bug: Breadcrumb throws an exception when window.fetch is passed a Request object instead of a URL string

See original GitHub issue

Version: 3.14.0 Browser: Chrome 56 OS: Linux Plugins: none

When reporting exceptions in my application after upgrading from 3.10.0 I’m getting an error during reporting str.substr is not a function.

Digging into the code it looks like the problem is that Raven is logging fetches for the breadcrumbs, but it expects the first argument of the fetch to be a URL. However, it is valid for it to be a Request object. This is causing the type error because the Request object is stored in the "url" field and is expected to be a string on line 1429.

Expected behavior is that the library handle fetch breadcrumbs and report errors. 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
LewisJElliscommented, Apr 6, 2017

Thanks for the report, @periodic. I haven’t looked at our fetch instrumentation, but I’m familiar with fetch taking either a url string or a Request object, so this sounds plausible. I’ll investigate.

0reactions
timtyrrellcommented, Apr 14, 2017

We haven’t been getting errors for a long time because of this… I can confirm that 3.13.1 is the last version that works with Request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to execute 'fetch' on 'Window': Request with GET/HEAD ...
I ran into this issue. Here is how I resolved it: I had a method like this: [HttpGet] public IEnumerable<MyObject> Get(MyObject dto) {...
Read more >
parse_url - Manual - PHP
This function parses a URL and returns an associative array containing any of the various components of the URL that are present.
Read more >
Cypress Tips and Tricks - Gleb Bahmutov
If the fetch call fails, the file does not exist. If the fetch call succeeds, the returned text will NOT be original JSON!...
Read more >
What is "Script Error"? - Sentry
Learn what causes the inscrutable JavaScript “Script error”
Read more >
Request() - Web APIs - MDN Web Docs
The Request() constructor creates a new Request object. ... A string containing the URL of the resource you want to fetch. The URL...
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