screenpipe icon indicating copy to clipboard operation
screenpipe copied to clipboard

[bug] Connection lost. retrying

Open gamersalpha opened this issue 1 year ago • 10 comments

Hello so i got this version :

screenpipe_0.14.2_x64-setup.exe

Status loks good :

image

but when i try to got in timeline i got this error : image

and i have nothing to see and the error page :

but on the folder i can see all video data recorded :

image

what do u think is wrong please ?

gamersalpha avatar Nov 27 '24 17:11 gamersalpha

same here +1

lorrylockie avatar Nov 28 '24 01:11 lorrylockie

same here +1

xiaoheiit6 avatar Nov 28 '24 07:11 xiaoheiit6

@tribhuwan-kumar can you help?

/bounty 100

louis030195 avatar Nov 28 '24 16:11 louis030195

💎 $100 bounty • Screenpi.pe

Steps to solve:

  1. Start working: Comment /attempt #787 with your implementation plan
  2. Submit work: Create a pull request including /claim #787 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to mediar-ai/screenpipe!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @tribhuwan-kumar #979

algora-pbc[bot] avatar Nov 28 '24 16:11 algora-pbc[bot]

@tribhuwan-kumar can you help?

/bounty 100

sure, I'll update you soon!

tribhuwan-kumar avatar Nov 28 '24 16:11 tribhuwan-kumar

screenpipe_0.14.2_x64-setup.exe

@gamersalpha can you update to latest version? i just checked it and its working fine

tribhuwan-kumar avatar Nov 29 '24 11:11 tribhuwan-kumar

i feel like facing this issue randomly on windows

louis030195 avatar Nov 29 '24 18:11 louis030195

i feel like facing this issue randomly on windows

I've seen this problem on macOS as well, maybe it's a compilation issue?

xiaoheiit6 avatar Nov 30 '24 01:11 xiaoheiit6

something related to react state i believe because usually i right click reload the ui and it works

louis030195 avatar Nov 30 '24 16:11 louis030195

something related to react state i believe because usually i right click reload the ui and it works

yes, maybe that's the reason also this could possibly occur when the timeline has not enough data to stream frames, if you look into the timeline page the loading frames and connection lost is overlapping. this could depends on url response

    const url = `http://localhost:3030/stream/frames?start_time=${startTime.toISOString()}&end_time=${endTime.toISOString()}&order=descending&target_fps=${target_fps}`;

    setLoadedTimeRange({
      start: startTime,
      end: endTime,
    });

    console.log("starting stream:", url);

    const eventSource = new EventSource(url);
    eventSourceRef.current = eventSource;
    eventSource.onerror = (error) => {
      if (eventSource.readyState === EventSource.CLOSED) {
        console.log("stream ended (expected behavior)", error);
        setIsLoading(false);
        return;
      }

      console.error("eventsource error:", error);
      setError("connection lost. retrying...");
    };

tribhuwan-kumar avatar Dec 03 '24 13:12 tribhuwan-kumar

something related to react state i believe because usually i right click reload the ui and it works

yes, maybe that's the reason also this could possibly occur when the timeline has not enough data to stream frames, if you look into the timeline page the loading frames and connection lost is overlapping. this could depends on url response

    const url = `http://localhost:3030/stream/frames?start_time=${startTime.toISOString()}&end_time=${endTime.toISOString()}&order=descending&target_fps=${target_fps}`;

    setLoadedTimeRange({
      start: startTime,
      end: endTime,
    });

    console.log("starting stream:", url);

    const eventSource = new EventSource(url);
    eventSourceRef.current = eventSource;
    eventSource.onerror = (error) => {
      if (eventSource.readyState === EventSource.CLOSED) {
        console.log("stream ended (expected behavior)", error);
        setIsLoading(false);
        return;
      }

      console.error("eventsource error:", error);
      setError("connection lost. retrying...");
    };

can you send a PR? happy to give tip

maybe retry or something, idk

louis030195 avatar Dec 12 '24 18:12 louis030195

can you send a PR?

sure, there are some edge cases to handle as an example:

image

tribhuwan-kumar avatar Dec 13 '24 13:12 tribhuwan-kumar

💡 @tribhuwan-kumar submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Dec 15 '24 12:12 algora-pbc[bot]

🎉🎈 @tribhuwan-kumar has been awarded $100! 🎈🎊

algora-pbc[bot] avatar Dec 15 '24 23:12 algora-pbc[bot]