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.

Endless query loop after starting the web frontend locally, 'skip' parameter without effect

See original GitHub issue

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Operating System:
    • macOS 12.5.12
  • Browser:
    • Chrome 104
  • NodeJS:
    • v16.12.0

Expected Behavior

Show whatever data the root URL of the web UI shows.

Actual Behavior

When opening the root URL of the web UI, I saw a permanent spinner showing something like “loading data”.

The API logged entries like this constantly:

[1] 2022-08-30T17:18:29.230Z [api] info: Footprint API request started.
[1] 2022-08-30T17:18:29.230Z [Cache] info: Using local cache file...

The browser’s network panel showed a fast sequence of requests to URLs like http://localhost:3000/api/footprint?start=2021-08-30&end=2022-08-30&ignoreCache=false&groupBy=day&limit=90&skip=257670, with the skip parameter being incremented with every request.

It looks like whatever numeric value I use as skip parameter, the request always returns data. So I’m thinking that the frontend never reaches any exit condition.

skip = 0:

... "periodStartDate":"2022-08-29T00:00:00.000Z","periodEndDate":"2022-08-29T23:59:59.000Z" ...

skip = 10:

... "periodStartDate":"2022-08-29T00:00:00.000Z","periodEndDate":"2022-08-29T23:59:59.000Z" ...

skip = 100000000:

... "periodStartDate":"2022-08-29T00:00:00.000Z","periodEndDate":"2022-08-29T23:59:59.000Z" ...

To Reproduce


image image

Additional Information

I set up the application locally using the guided install. I connected it to an Azure subscription.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4upzcommented, Oct 20, 2022

@marians No worries, we’ll go ahead and close this issue since there’s no action to take at the moment. But if you get a chance to retest and encounter the same or a different issue, feel free to reopen or a leave a new comment with the details!

marianscommented, Oct 19, 2022

I wasn’t able to test this since I reported the issue, sorry

Read more comments on GitHub >

github_iconTop Results From Across the Web

Looping code - Learn web development | MDN
The final-expression is then run after the code inside the loop has run (an iteration has been completed), which will only happen if...
Read more >
For Each...Next Statement - Visual Basic - Microsoft Learn
When you nest loops, each loop must have a unique element variable. You can also nest different kinds of control structures within each...
Read more >
Why does this method result in an infinite loop? - Stack Overflow
You are returning a query that iterates over itself. The key is that you reference items within the lambda. The items reference is...
Read more >
How to Solve the Infinite Loop of React.useEffect()
1.1 Fixing dependencies ... The infinite loop is fixed by correct management of the useEffect(callback, dependencies) dependencies argument.
Read more >
How To Handle Async Data Loading, Lazy Loading, and Code ...
In future versions of React, you'll be able to use Suspense to load data in nested components without render blocking. In this tutorial,...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found