Jump to content
memo

[sc4pac] Let's write our own package manager

304 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    Attention: This is a security update. Version 1.4.0 of the application is now available.

    My advice is to upgrade to the latest version of sc4pac directly – as a precaution, without opening any older version of the GUI. Older versions cannot be used anymore. If you do open an older version, it will tell you to upgrade to the latest version.

    Affected versions: 1.3.1 and all earlier versions of the GUI (Windows/Linux/web-app). (The CLI is not affected.)
    Fixed versions: 1.4.0 and later.

    The resolved issue: If there had been a malicious website specifically targeting sc4pac users, and you opened the website while the sc4pac GUI was running, it would have been possible for the website to install arbitrary files on your system without user interaction.

    Impact: I have no indication that such a malicious website exists, so realistically I think there's no need to be overly concerned about this issue, at this point. Such a website would have to be designed for sc4pac specifically which, given the size of the community, seems unlikely. There's no problem if you visit any random shady website that's not related to the community in some way. There's no problem when the GUI isn't running. There's also no problem if you use Safari or Brave as web browser.

    So, to summarize, I have no indication that the issue has been abused, so far. But, as precaution, be sure to upgrade to the latest version.


    Other changes included in this release:

    Quote
    • Fixed an issue preventing the import and export of JSON mod sets if the JSON file was too large
    • New Features:
      • New buttons "Reinstall" and "Redownload & Reinstall" for each package
      • New button "Scan & Repair Plugins" to resolve problems when plugin files are out-of-sync with sc4pac's internal state
      • New button to "Rename" a Profile
      • Options for deleting a Profile or uninstalling all packages
      • Sc4pac now shows a warning if two Profiles use conflicting Plugins folders.

    Most of the new features focus on functionality to help you resolve abnormal situations, that wouldn't usually occur under normal circumstances. For example:

    • If you've accidentally deleted a file from the Plugins folder, use the "Reinstall" button for the corresponding package.
    • If a downloaded file is corrupted and fails to extract or doesn't contain the expected files, use the "Reinstall & Redownload" button.
    • If you've accidentally removed an .sc4pac folder from your Plugins, use the "Scan & Repair Plugins" button to re-sync the Plugins folder with sc4pac.
    • If you've created two Profiles with conflicting Plugins folder locations, sc4pac will warn you about it.
    • Additionally, you can now rename and delete Profiles.

     

    2025-11-02_19_11_53.png.8d37e85fe19995f1689ab72715c13acd.png

    2025-11-02_19_12_50.png.28207a78a42400fe5354369a8ac48d8a.png

    2025-11-02_19_14_19.png.fe0047dfbc283a1ca8276c33dc57db77.png

    • Like 8
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Finally, coming back to this:

    On 10/24/2025 at 9:48 AM, timdmackey said:

    Also, I stumbled across Zasco's sc4pac channel, it appears that it's mentioned in the sc4pac "About" page, but aside from that It's not very discoverable at all (and it's not included in sc4pac's default channels). Is there any reason against either merging it into the main channel or adding it as an additional channel in sc4pac?

    The channel hasn't been updated in a long time, so without maintenance its contents are basically available "as is". You may find some unique things there, but others might conflict with the other channels which have grown a lot since then.

     

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hello

    I am trying to run the program but I'm getting the following error

     

    ```
    Sc4pac GUI version: 1.4.0
    Sc4pac CLI version: null
    Platform: macOS
    Web: true
    Java: null
    OS (Java): null

    Error type: /error/unauthorized
    Error title: Authentication failed
    Error detail: Invalid or expired token.

    Init phase: InitPhase.loadingProfiles
    Authority: localhost:51515
    Authenticated: null
    Profiles config folder: null
    Profile ID: null
    Profile name: null
    Plugins folder: null
    Cache folder: null

    Server log: null
    ```

     

    Running on Mac OS 

    Thanks!

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I am having an issue where upon launching of the sc4pac-gui.exe, the program hangs and is perpetually stuck in "Pending updates, checking for updates".  Any ideas on how to troubleshoot and fix this please? I have verified plugin folder locations, and deleted cache folders. I've tried multiple java versions and vendors. 

    ```
    Sc4pac GUI version: 1.4.0
    Sc4pac CLI version: 0.9.0
    Platform: windows
    Web: false
    Java: 24 - Java HotSpot(TM) 64-Bit Server VM 24.0.2+12-54/24.0.2, Oracle Corporation, Java(TM) SE Runtime Environment, C:\Program Files\Java\jdk-24
    OS (Java): Windows 11 10.0 amd64
    OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 26200)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: E:\sc4pac-gui-windows-x64\sc4pac-gui.exe
    Arguments: [--port, 47020, --profiles-dir, C:\Users\rafe\AppData\Roaming\io.github.memo33\sc4pac\config\profiles]

    Init phase: InitPhase.initialized
    Authority: localhost:47020
    Authenticated: true
    Profiles config folder: C:\Users\rafe\AppData\Roaming\io.github.memo33\sc4pac\config\profiles
    Profile ID: 1
    Profile name: Original
    Plugins folder: f:\Users\rafe\Documents\SimCity 4\Plugins
    Cache folder: C:\Users\rafe\AppData\Local\io.github.memo33\sc4pac\cache

    Server log:
    NOTE: Picked up JDK_JAVA_OPTIONS: "--enable-native-access=ALL-UNNAMED" "--sun-misc-unsafe-memory-access=allow"
    ```

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    21 hours ago, tmclaug3 said:

    Error title: Authentication failed
    Error detail: Invalid or expired token.

    @tmclaug3 Do you have more details about the exact steps that lead to this? By double clicking the launch script, the web-app is automatically opened in your default browser. Then you see this error? Have you tried to completely restart the app? Which browser do you use? Are cookies enabled?

    Could you try to open the browser dev tools for the tab in which the web-app is opened and check that a Cookie named "__Host-access_token" exists and hasn't expired yet, and that a "csrf_token" exists in Local Storage?

    2025-11-10_21_22_16.png.4723ccce96454cb57c75194e1372580f.png

    2025-11-10_21_21_32.png.fa3d3342b692f82af848bfcaf96e1605.png

     

    2 hours ago, Orion96007 said:

    I am having an issue where upon launching of the sc4pac-gui.exe, the program hangs and is perpetually stuck in "Pending updates, checking for updates". 

    @Orion96007 Is it perpetually stuck, or just very slow? Give it some time. Lately, GitHub is giving us very slow download speeds. I'm aware of the problem, but currently don't have any time to work on it.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, memo said:

    @tmclaug3 Do you have more details about the exact steps that lead to this? By double clicking the launch script, the web-app is automatically opened in your default browser. Then you see this error? Have you tried to completely restart the app? Which browser do you use? Are cookies enabled?

    Could you try to open the browser dev tools for the tab in which the web-app is opened and check that a Cookie named "__Host-access_token" exists and hasn't expired yet, and that a "csrf_token" exists in Local Storage?

    2025-11-10_21_22_16.png.4723ccce96454cb57c75194e1372580f.png

    2025-11-10_21_21_32.png.fa3d3342b692f82af848bfcaf96e1605.png

     

    @Orion96007 Is it perpetually stuck, or just very slow? Give it some time. Lately, GitHub is giving us very slow download speeds. I'm aware of the problem, but currently don't have any time to work on it.

    @memo, I have allowed the program to run for several hours, and this last time "Over the weekend" and is still "Pending updates, checking for updates"

    Screenshot 2025-11-10 123828.jpg

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    10 minutes ago, Orion96007 said:

    I have allowed the program to run for several hours, and this last time "Over the weekend" and is still "Pending updates, checking for updates"

    Ok, no need to wait that long. After the "Checking for updates" has run for, let's say, 5 minutes, can you go to Settings → About → Show Debug Info → Copy, and then send the results? I'm mainly interested in whether there's something under "Server log" at the bottom.

     

    Edit: Ah, scratch that. You've already sent the debug info. Not sure what's going on. Here's one more thing to try.

    Go to the folder "C:\Users\rafe\AppData\Roaming\io.github.memo33\sc4pac\config\profiles\1" and open it in your file explorer. Then open CMD.exe in that folder by typing "CMD" in the address bar. Then run the command

    E:\sc4pac-gui-windows-x64\cli\sc4pac update

    and see if it succeeds or throws any errors.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Ahhhh I missed the step "Go to profiles folder and run from there... It is much more busy.... I will let you know... It is doing a lot of things within the CLI.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    22 hours ago, Orion96007 said:

    No errors

    Screenshot 2025-11-10 131422.jpg

    sc4pac-gui is still stuck in pending updates though... It "feels like" it is not accessing profiles folder correctly as the CLI does.... I would like to say that I do appreciate the program and your prompt responses to this @memo... Great job!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 11/10/2025 at 10:12 PM, Orion96007 said:

    It is much more busy

    It's because you've enabled debug mode. That's fine though.

    Ultimately, the program will need to be updated to incorporate a timeout or a cancellation option for the pending updates check. Currently, I don't know what the underlying problem is, though.

    A few troubleshooting steps you can try:

    • Launch the app from the console, e.g. open CMD.exe and run:
      E:\sc4pac-gui-windows-x64\sc4pac-gui.exe
      Optionally, append your custom arguments for --port and --profiles-dir, but the defaults should work just as well. If there are any error messages logged to the console output, this would be very helpful for understanding what's going wrong with the GUI. If the server log is too busy, disable debug mode beforehand.

       
    • Create a backup of your "profiles" folder. Then delete it entirely to see if it makes a difference. If it works with a fresh profiles folder, send me a copy of the previous folder for debugging. Maybe I can see what's wrong there.
       
    • Lowercase drive letters are kind of unusual. Not sure if it matters, though. Did you select the Plugins path using the GUI, or edit the JSON file manually? Perhaps, replacing f:\ by F:\ is worth a try.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi there!
    I downloaded the 1.4.0 version and unzipped it on top of the old version.
    Probably did not do the right thing since now, when trying to open the SC4Pac GUI is giving me an error: "Launching the local sc4pac server failed"

    Here's the debug info that it gives me:

    ```
    Sc4pac GUI version: 1.4.0
    Sc4pac CLI version: null
    Platform: windows
    Web: false
    Java: null
    OS (Java): null
    OS (Dart): windows - "Windows 10 Home" 10.0 (Build 19045)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: D:\MaxisGames\SC4Pac\gui\sc4pac-gui.exe
    Arguments: []
    
    Error type: /error/unexpected
    Error title: Launching the local sc4pac server failed (1).
    Error detail: 
    	at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:115)
    
    	at io.github.memo33.sc4pac.cli.CliMain$.main(cli.scala:942)
    
    
    Init phase: InitPhase.connecting
    Authority: localhost:51515
    Authenticated: null
    Profiles config folder: null
    Profile ID: null
    Profile name: null
    Plugins folder: null
    Cache folder: null
    
    Server log:
    Exception in thread "main" 
    java.lang.NoSuchMethodError: 'boolean java.lang.CharSequence.isEmpty()'
    	at zio.http.Body$.fromCharSequence(Body.scala:256)
    	at zio.http.Response$.json(Response.scala:394)
    	at io.github.memo33.sc4pac.api.Api.jsonResponse(api.scala:20)
    	at io.github.memo33.sc4pac.api.Api.<init>(api.scala:84)
    	at io.github.memo33.sc4pac.cli.Commands$Server$.serve(cli.scala:769)
    	at io.github.memo33.sc4pac.cli.Commands$.$anonfun$189$$anonfun$2$$anonfun$2$$anonfun$1$$anonfun$3$$anonfun$1(cli.scala:864)
    	at zio.Scope$ExtendPartiallyApplied$.apply$extension(Scope.scala:202)
    	at zio.Scope$UsePartiallyApplied$.apply$extension(Scope.scala:207)
    	at zio.ZIO$.zio$ZIO$ScopedPartiallyApplied$$$_$apply$extension$$anonfun$11(ZIO.scala:5685)
    	at zio.ZIO$.suspendSucceed$$anonfun$1(ZIO.scala:4886)
    	at io.github.memo33.sc4pac.cli.Commands.Server.run.task(cli.scala:881)
    	at io.github.memo33.sc4pac.cli.Commands.Server.run.task(cli.scala:882)
    	at io.github.memo33.sc4pac.cli.Commands.Server.run.task(cli.scala:883)
    	at io.github.memo33.sc4pac.cli.Commands.runMainExit(cli.scala:82)
    	at io.github.memo33.sc4pac.package.unsafeRun(package.scala:62)
    	at io.github.memo33.sc4pac.package$.unsafeRun$$anonfun$1(package.scala:62)
    	at zio.Unsafe$.unsafe(Unsafe.scala:37)
    	at io.github.memo33.sc4pac.package$.unsafeRun(package.scala:62)
    	at io.github.memo33.sc4pac.cli.Commands$.io$github$memo33$sc4pac$cli$Commands$$$runMainExit(cli.scala:14)
    	at io.github.memo33.sc4pac.cli.Commands$Server$.run(cli.scala:884)
    	at io.github.memo33.sc4pac.cli.Commands$Server$.run(cli.scala:845)
    	at caseapp.core.app.CaseApp.main(CaseApp.scala:162)
    	at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:115)
    	at io.github.memo33.sc4pac.cli.CliMain$.main(cli.scala:942)
    ```

    Help!!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    18 hours ago, mad_genius said:

    when trying to open the SC4Pac GUI is giving me an error: "Launching the local sc4pac server failed"

    @mad_genius Thanks for the report. I wasn't aware of this, but Java 17 is now the minimum supported Java version, so please upgrade to a more current version of Java (17 or later).

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 11/13/2025 at 3:28 PM, memo said:

    @mad_genius Thanks for the report. I wasn't aware of this, but Java 17 is now the minimum supported Java version, so please upgrade to a more current version of Java (17 or later).

    Oh, ok.
    That explains the "Java: null" in the crash report.
    I though that was weird since I have openjdk 11 installed.

    I've upgraded to the latest OpenJDK, opendjdk 25 at the time of this post, and it works correctly now.

    Thank you for the help, and all the amazing effort required to develop this package manager.

    And thank you also to all the community members that are put in effort to make mods available through it.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I installed Java 25.  It is working but I can not see anything to download.  Playing around with this I have also lost the region I was working on.  Oh, well. Here is what I see on sc4 pac. Nothing to select What should I do?  Thanks so much for your help.

    image.png.74e3bafb059d5c1d9f210fda35941c90.png

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    It looks like I will have to start from scratch and reload everything to run the App SC4.  It is not recognizing my Plugins.  My personal Regions are gone but that is my fault as I probably trashed them as I was trying to get to a clean version of everything.  I think I"m going to have to start from scratch reloading everything.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I have tried to delete and reload SC4 and sc4 pac.  When I try to download plug ins I still get the issue that nothing shows up to download.  I am also getting this message.

    image.png.f015a78a5256ea351504b451ebfffcb8.png

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Memo, thanks for your help.   I spent several hours removing every file I could find related to sc4 pac.  I then downloaded the app again and it now works!!!!

    image.png.13910f5c9f048e99a1f95d21d2564832.png

    • Like 3

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Anybody know how to fix this?  I've tried to remove it from my files with this still showing up.  My computer doesn't think it is there anymore but the game does. Any help is appreciated.

    image.png.0aa044185b8c5027f25aa3e1d4d0810c.png

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    A user recently ran into the Windows package file path length issue due to overlooking the null-45:startup-performance-optimization-dll dependency listed in the sc4pac description.

    Would it be feasible for sc4pac on Windows to warn the user if null-45:startup-performance-optimization-dll isn't installed?

    Checking if any file paths exceed the 260 character limit would be optional before issuing a warning, but given the other performance advantages to that DLL it probably isn't necessary.

    The user in that thread likely isn't the only Windows sc4pac user that overlooked the part of sc4pac's description that mentions the Startup Performance Optimization DLL is a required dependency. The problem wouldn't always be immediately obvious in-game, and even when it is most users wouldn't know that it was due to the game failing to load plugins that are visibly present in the plugin folders.

    • Like 2
    • Yes 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 12/2/2025 at 11:47 PM, Null 45 said:

    The user in that thread likely isn't the only Windows sc4pac user that overlooked the part of sc4pac's description that mentions the Startup Performance Optimization DLL is a required dependency

    :uhm: 

    This also happened to me a while or so back, so I have to believe it's common enough for a fix of some sort. One possibility could be to make the startup dll a dependency for config:sc4-edition-windows-digital, which would force it to be installed whenever a user makes that selection.

    • Like 2

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    28 minutes ago, nos.17 said:

    One possibility could be to make the startup dll a dependency for config:sc4-edition-windows-digital, which would force it to be installed whenever a user makes that selection.

    That would fix it for new users of the Windows digital release, but I don't know if it would help existing users unless they change their plugins. It also would leave the Windows CD users with the same silent failure to load plugins, but that is probably a small group and the DLL doesn't support those game versions due to them being encrypted by the SafeDisc DRM.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, Null 45 said:

    That would fix it for new users of the Windows digital release, but I don't know if it would help existing users unless they change their plugins. It also would leave the Windows CD users with the same silent failure to load plugins, but that is probably a small group and the DLL doesn't support those game versions due to them being encrypted by the SafeDisc DRM.

    I am pretty sure in sc4pac that if a package you have gets updated, you'll see a notification about it asking to update (as long as a change in the version string in the metadata is detected). But yes, the CD users are rather SOL. I suspect that the Windows CD users and sc4pac user is even smaller (zero?).

    • Like 2

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections