TypeError: NetworkError when attempting to fetch resource when terminating the experiment

URL of experiment: grain_country [PsychoPy]

Description of the problem: Whenever I finish the experiment, I get the following error message:

Strangely, when I go off wifi and use my phone’s 4G, I no longer get the error message. I’m not sure if this is also related, but I wasn’t able to sync my experiment with Pavlovia on wifi either, and had to either go on my 4G or use a VPN.

Any help with this would be greatly appreciated!

Tell us more about the WiFi network.

Would it happen to be C2K?

Hi @wakecarter, my wifi provider is toob. I should also mention that I didn’t have this issue around a month ago when I worked on another experiment (and I had the same wifi provider then).

What error message do you get when you try to sync? Is that recent too? Try a new test experiment in case there is something about this particular one, e.g. are you saving microphone recordings? Are you saving CSV or database? Try one and then the other.

It might be something to do with shared IP addresses.

You could also try launching Chrome without Cross-Origin Resource Sharing (CORS)

chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security

I really appreciate the suggestions. I respond to each in turn:

  1. Below is the error message I get when I try to sync, and yes this is recent too:

Traceback (most recent call last):
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 1612, in onPavloviaSync
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 912, in sync
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1155, in firstPush
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/git/cmd.py”, line 986, in
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1598, in _call_process
File “/Applications/PsychoPy2024.2.1(py3.10).app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1388, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(1)
cmdline: git push -u https://*****:*****@gitlab.pavlovia.org/ArianaUCL/test master
stderr: ‘warning: redirecting to Sign in · GitLab
error: RPC failed; curl 56 LibreSSL SSL_read: LibreSSL/3.3.6: error:1404C3FC:SSL routines:ST_OK:sslv3 alert bad record mac, errno 0
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date’

  1. I’ve tried to sync previous experiments that used to sync fine and get the same error message.

  2. No, I’m not saving microphone recordings.

  3. I was saving to CSV, which led to the error message in my original post. I changed it to database and get an almost identical error message minus the flushing participant’s logs line:

  1. I didn’t know that about toob…

  2. I’m currently not sure how to implement the Chrome suggestion (I’m a Mac user that uses Firefox), but I’ll look further into it.

I’ve just asked ChatGPT and it suggests the following:

To launch Firefox on a Mac with CORS disabled, you can use a command-line option. Disabling CORS can be helpful for testing purposes, but it should be done with caution, as it introduces security risks.

Here are the steps to launch Firefox without CORS on a Mac:

1. Close All Running Instances of Firefox

Ensure that no instances of Firefox are running.

2. Open Terminal

  • Use Command + Space, type Terminal, and press Enter to open the terminal.

3. Run Firefox with the --disable-web-security Flag

Execute the following command in the terminal:

/Applications/Firefox.app/Contents/MacOS/firefox --disable-web-security --user-data-dir=/tmp/firefox_dev
  • The --disable-web-security flag disables the CORS policy.
  • The --user-data-dir=/tmp/firefox_dev ensures that you use a separate user data directory to prevent interference with your main Firefox profile.

4. Access Your Application

Navigate to your application in the browser window that opens.

Notes and Caution:

  • Do not use this setup for normal browsing, as it exposes your browser to potential security vulnerabilities.
  • Keep this instance separate from your main Firefox browser session.
  • Use this only for testing and development purposes.

I tried this (it didn’t work at first but ChatGPT had the answers), and I still got the error after terminating the experiment.

In that case I would try testing it on another ISP and then ask toob if there have been any recent changes to your account. Perhaps they can tell you whether your IP address is being shared.

Will do. If it’s only me that has the issue and I have to use 4G whenever I sync or complete experiments, I don’t mind. I’m just worried participants will experience the same problem.

Thanks a lot for your help.