Shell script to remove infinite refresh bug to allow gopanda2 to initialize
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-04-10 01:43:01 -07:00
patch.sh fix directory, add documentation 2025-04-10 01:43:01 -07:00
README.md fix directory, add documentation 2025-04-10 01:43:01 -07:00

GoPanda2 Infinite Refresh Patcher

This tool fixes the infinite refresh/reload loop issue affecting GoPanda2 AppImage. It seems as though once GoPanda2 is able to initialize you won't need the patched version anymore, so I wouldn't worry about installing appimagetool and just run the patched version from /tmp/ and then go back to using the original AppImage.

The Problem

Many users have reported that the GoPanda2 AppImage gets stuck in an endless refresh loop, making the application unusable. The application shows a white screen, briefly loads the news/MOTD, then immediately refreshes again, continuing in a loop. This issue has been reported in multiple forums:

How This Fix Works

The script modifies the main.js file within the application to replace the problematic reload function with a version that only logs "Reload prevented" to the console and returns null. This prevents the application from entering the infinite refresh cycle.

Requirements

  • The asar tool (install with npm install -g asar)
  • appimagetool (optional, for rebuilding the AppImage)

Usage

  1. Save the patcher script as patch-gopanda2.sh
  2. Make it executable: chmod +x patch-gopanda2.sh
  3. Run it with the path to your GoPanda2 AppImage:
    ./patch-gopanda2.sh /path/to/GoPanda2.appimage
    
  4. The script will create a patched version with "-patched" added to the filename

If appimagetool is not installed, the script will provide instructions for running the patched version directly or creating a proper AppImage later.

Technical Details

The patcher script:

  1. Extracts the GoPanda2 AppImage
  2. Extracts the app.asar package (an archive containing the Electron app)
  3. Modifies the main.js file to replace the Og() function (responsible for reloading) with a version that just logs "Reload prevented" and returns null
  4. Repacks everything into a new, patched AppImage