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.

OidcServiceWorker.js: Failed to execute 'clone' on 'Request': Request body is already used

See original GitHub issue

Issue and Steps to Reproduce

Configuration:

{
    client_id: 'myapp',
    redirect_uri: window.location.origin + '/authentication/callback',  
    post_logout_redirect_uri: window.location.origin + '/authentication/logout-callback',
    scope: 'openid profile email roles offline_access',
    authority: window.location.origin,
    service_worker_relative_url: '/OidcServiceWorker.js',
    service_worker_only:false,
}

Versions

5.13.1

Screenshots

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
guillaume-chervetcommented, Jul 19, 2022

I found the bug by hazard !

You can try the 6.0.0-alpha2 pretty stable (I have just to finish documentation) and it fix it.

https://github.com/AxaGuilDEv/react-oidc/blob/295776fbfeabde78f6d39ae5326f3a7da5050a11/MIGRATION_GUIDE_V5_TO_V6.md

1reaction
amarmechaicommented, Jul 11, 2022

I will try to prepare an example for you as soon as possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Request object that has already been used
I'm getting this now: Uncaught (in promise) TypeError: Failed to execute 'clone' on 'Request': Request body is already used. – Julian Sanchez ·...
Read more >
Request.clone() not duplicating body stream · Issue #5951
And the server throws error: Uncaught TypeError: Failed to execute 'clone' on 'Response': Response body is already used because the body stream ...
Read more >
Response.clone() - Web APIs - MDN Web Docs
clone () throws a TypeError if the response body has already been used. ... clone live) we create a new Request object using...
Read more >
What happens when you read a response?
The new fetch API gives the web proper Request and Response primitives. ... parsing as JSON failed, let's get the text response.body.
Read more >
node-fetch
A light-weight module that brings Fetch API to node.js. ... Use native Node streams for body, on both request and response.
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