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.

I simply can't use/config trackRequests anymore and I'm not sure why

See original GitHub issue

I had to recreate my test environment and I was using miragejs just fine, tracking all requests and asserting what I needed. But, on this new test environment (using React), I keep getting the same freaking error. I’m using version 0.1.44.

Mirage: Error: You cannot modify Pretender’s request tracking once the server is created

My config is like this now:

export function makeServer() {
    return createServer({
        environment: "test",
        trackRequests: true,
        serializers: {
            application: ApplicationSerializer
        },

I’ve already tried removing the environment, removing the trackRequests as well (hoping it would track if it was a test environment), etc. But nothing works.

And after removing the trackRequests from the configuration, I saw this on the mirageServer log:

image

Anyone with this problem as well? Please help 😦

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
cah-brian-gantzlercommented, Jun 1, 2022

I added track requests to my work application and an now getting the error, Ill dig into it. What does concern me is that above you said that you removed tracked requests and it still did not work. So hoping if I find the issue it will spill over into what ever your problem is without trackRequests

1reaction
richardnikolascommented, Jun 2, 2022

It’s working just fine now, @IanVS 😄 Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

support for server-side components in nextjs-auth0 · Issue #889
In next.js there is no server-side context with request and response anymore. Instead, there is: import { headers } from 'next/headers';; import ...
Read more >
Default query params not getting passed in axios request
I solved it using 2 ways: Using default params and spreading them when using the request export const API_DEFAULT_PARAMS = { part: 'part', ......
Read more >
Status of IGMP/MLD on the UniFi line - timeline?
I've already resigned for the time being of deploying UniFi switching equipment due to the problems with IP multicast that the switches currently...
Read more >
ADPassMon - Your Mac / Linux Guy - WordPress.com
ADPassMon, short for Active Directory Password Monitor, is a utility that solves this issue by providing up-to-date password expiration information at a ...
Read more >
When I uninstall the AnyDesk app, is there still a danger for ...
The good news is that this person uninstalled the app, so hopefully the scammer won't be able to access their phone anymore. However,...
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