Jump to content
memo

[sc4pac] Let's write our own package manager

320 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Ah. CB explained this one to me (via our private channel). It's in a special category called Holding Bay and it was put there so @smf_16 could test all the metadata for the STEX API which CB created for the integration with sc4pac. That part seems to have been placed on hold?

Anyhow, only staff can see said category and it prolly should not be offered by sc4pac.

Or it needs to be moved to a public category. *;) 

  • Like 2
  • Thanks 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
1 hour ago, CorinaMarie said:

...That part seems to have been placed on hold?

Anyhow, only staff can see said category and it prolly should not be offered by sc4pac.

Or it needs to be moved to a public category. *;) 

Maybe add a banner to let others know...? Unless, of course, things have progressed well past the 'testing' phase and it can be 'released'...?

Just a thought.

  • Thanks 1

A wise man once said, "I am not yet a wise man..."

Endless Road 4.jpg

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
38 minutes ago, CaptCity said:

Maybe add a banner to let others know...? Unless, of course, things have progressed well past the 'testing' phase and it can be 'released'...?

No one except staff can even see it if there were a banner.

Hopefully, @smf_16 can let us know if they are done testing. All I know for sure is CB spent hour and hours (and hours) tweaking the API and then hasn't heard back. (We don't want to mess up the testing grounds if we don't need to.)

In the meantime, if someone needs the file and can't get it, I believe it'd be alright to shoot it over to them via PM. 

  • Yes 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
1 hour ago, CorinaMarie said:

No one except staff can even see it if there were a banner.

Oh, duh... Silly me.  :blush:

I was reading the others' comments as if they could see the entry but couldn't get the file.

1 hour ago, CorinaMarie said:

In the meantime, if someone needs the file and can't get it, I believe it'd be alright to shoot it over to them via PM. 

Sounds good.

  • Like 1

A wise man once said, "I am not yet a wise man..."

Endless Road 4.jpg

Share this post


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

Thank you for this tool, it allowed me to reinstall SC4 with the essential mods very quickly

suggestions:

- add a map manager to download maps. maybe even a world map view for selecting non-fictional locations

- allow to sort by popularity / rating

  • Like 2

Share this post


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

As for me, I don't need it any longer for testing, so it can be moved back to its original category.

  • Thanks 2

Visit www.growifier.com for ploppable residentials

Love playing hearts and other card games? Have a look at www.whisthub.com!

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
11 minutes ago, smf_16 said:

As for me, I don't need it any longer for testing, so it can be moved back to its original category.

Alright. It's back in Civic & NON-RCI.

If'n y'all want to re-test now, it should be ok. 

  • Like 2

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


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

Hi,
I just updated to 1.3.0 and have a similar issue as the recent post using OneDrive with "File access denied" ....but I'm not using OneDrive, nothing in my system as far as I can tell has changed.
After the new installation I went and used the update with sc4pac link for the new submenus update, when in the sc4pac userface it had 2 updates pending as shown in attached images, but i get an access denied message. Weird thing is it will allow me to install something new, but not update an existing file or remove one. Also when it fails, if i check the .sc4pac file its trying to update, the folder is still there but it is now empty.

Ive checked the usual Admin rights, folder location and user allowances. 687b7916a0e5c_Screenshot2025-07-19204743.png.e553c684083737d1d1683d0894035cbf.png687b79246b8d5_Screenshot2025-07-19203348.png.12d96f42d1b1f6ef613f94bf49ed376b.png

Share this post


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

    @Dono Be sure to exit the game before updating files with sc4pac, and quite any other programs that touch files in your plugins folder. If the problem persists, try rebooting your computer. Also make sure you're not using OneDrive unknowingly.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 hours ago, memo said:

    @Dono Be sure to exit the game before updating files with sc4pac, and...

    Yeah I do all those things out of habit. I'm not sure of other users using Win11 having issues but since I got my new pc with it installed I have had constant dramas with sc4pac. If I remove sc4pac altogether, can I keep the same file setup/order and just remove the .sc4pac file name on the downloaded folders, at least it will look organised 😊

    • Like 1

    Share this post


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

    @Dono Yes, you can do that. Before that, could you try a few things to help resolve the problem?

    • Right click the folder "100-props-textures" and go to Properties to check whether the Read-Only flag is set. If so, unset it.
    • Right click the folder "bsc.mega-props-rubik3-vol01-wtc-props.2.sc4pac" and go to Properties to check whether the Read-Only flag is set. If so, unset it.
    • Right click the file "C:\Users\sdono\Documents\SimCity 4\aAPPs\sc4pac-gui-windows-x64\cli\sc4pac-cli.jar" and go to Properties. If it says "Security: This file came from another computer and might be blocked to help protect this computer.", then unblock it.
    • Which anti-virus software do you use? Temporarily disable it or check if it interferes with sc4pac. For example, Comodo Anti-virus allegedly has an "Auto-containment" setting that can lead to this issue.
    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    8 hours ago, memo said:

    Yes, you can do that. Before that, could you try a few things to help resolve the problem?

    Thanks for your time memo.
    I've tried all that you suggested, and the only one that I could change anything was your 3rd point, but still no success. I'm unsure of other users with win11 but the Read-Only flag cant be changed. It looks like it changes but when you open the folder again it is back on. My extensive search found that multiple users online posted the same issue issue in win 11 where microsoft tech support said the "read-only" flag is misleading as it doesn't mean what it looks to be referring to....which kinda makes sense as all the folders on my system are read-only, even SimCity4 program folders which are being changed all the time.(but the folders aren't being removed).
    I turned off all anti-virus and even used command promps to try and turn the read-only flag off, I changed admin rights, made new ones, deleted all and just had one master one, changed ownership etc. 
    Getting back to me noticing the strange thing that once sc4pac gives the error, that the file has been deleted but the folder remains, I'm wondering if the win11 restructure is working as normal allowing sc4pac to remove the contents, but Win11 may have different rules for folders but sc4pac sees it as a file ending in .sc4pac.

    Anyway, don't spend too much energy on it, it would be good to know if other win11 users are finding similar issues with updating or deleting sc4pac files as it still lets me download new items.

    • Like 1
    • Thanks 1

    Share this post


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

    I've tried all that plus a lot of permissions combinations on the 'security' tab of files/folder properties with no success.
    I just gave up using the Plugins folder in Documents folder while using OneDrive and now I use the -UserDir prompt to a folder outside the domains of OneDrive. sc4pac is working like a charm. 

    • Like 2

    GG

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 22/07/2025 at 1:53 AM, marcio1977 said:

    I've tried all that plus a lot of ....

    Are you using windows11? I  originally did the same when I had onedrive but something in win11 changes and overrides it. I had it working in onedrive for about a year, then out of no where it failed, I then moved to a SYSTEM document folder so i could keep the normal documents on onedrive, that lasted about 2 or 3 months then it failed again as win11 decided that the system document folder should be incorporated with the onedrive documents folder, so I was back to the same problem. So I dumped onedrive all together thinking it was the root of the problem,  but now a month later it out of no where has started to fail again.. I run two identical simcity4 setups. One on an old win10 laptop and one on a new win11 laptop, the old setup still runs no issues....just too slow☹️

    Share this post


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

    Are you using windows11? I  originally did the same when I had onedrive but something in win11 changes and overrides it. I had it working in onedrive for about a year, then out of no where it failed, I then moved to a SYSTEM document folder so i could keep the normal documents on onedrive, that lasted about 2 or 3 months then it failed again as win11 decided that the system document folder should be incorporated with the onedrive documents folder, so I was back to the same problem. So I dumped onedrive all together thinking it was the root of the problem,  but now a month later it out of no where has started to fail again.. I run two identical simcity4 setups. One on an old win10 laptop and one on a new win11 laptop, the old setup still runs no issues....just too slow☹️

    Yes, I'm on Windows 11.
    I think that Windows-managed folders ('system folders') can somehow create some unwanted friction. And it turns out that the more recent the version, the more intrusive the system becomes, intending to "make life easier" for the user.
    In my case, I put everything directly in the root, in C:\SC4\Profile01\Plugins

    • Like 2

    GG

    Share this post


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

    Thanks for those who tried to help via here or PMs, some kind of Win 11 voodoo, wouldn't even work using the -UserDir:C:\... to a different local path. Last effort will be uninstalling sc4pac and reinstalling with it maintaining what was previously loaded. Any ideas on what files I need to keep?

    Share this post


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

    Spotted some errors:

    • Real RailWay (RRW) Reskin 3rd Party Lot Support on SC4E links toward both version 3.48 and 3.49 with different package names. Is this intended?
    • andisart:modern-hd-cars-mmp
      The package metadata seems to be out-of-date, so the installed plugin files might be incomplete. Please report this to the maintainers of the package metadata. These inclusion/exclusion patterns did not match any files in the asset andisart-modern-hd-car-props-incl-mmp: AndisArt_PROP_carpack_MMP.dat.dat.
      I guess it's because of the double .dat.dat file extension?
    • peg:csk2-3x-avenue-draw-bridge Failed to extract
    • mandelsoft:bnl-cloverleaf-insurances. Failed to extract error, same as the one that was on glenni:mehelia-taarnet-v2 and since as been fixed on that one
      ```
      Sc4pac GUI version: 1.3.0
      Sc4pac CLI version: 0.8.0
      Platform: windows
      Web: false
      OS (Java): Windows 11 10.0 amd64
      OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 26100)
      Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
      Exe: C:\Program Files\sc4pac-gui-windows-x64\sc4pac-gui.exe
      Arguments: []
      
      Error type: /error/extraction-failed
      Error title: Failed to extract C:\Users\USER\AppData\Local\io.github.memo33\sc4pac\cache\coursier\https\community.simtropolis.com\files\file\28636-bnl-cloverleaf-insurances\%3Fdo%3Ddownload%26r%3D113933.
      Error detail: Error on ZipFile C:\Users\USER\AppData\Local\io.github.memo33\sc4pac\cache\coursier\https\community.simtropolis.com\files\file\28636-bnl-cloverleaf-insurances\%3Fdo%3Ddownload%26r%3D113933
      
      Init phase: InitPhase.initialized
      Authority: localhost:51515
      Authenticated: true
      Profiles config folder: C:\Users\USER\AppData\Roaming\io.github.memo33\sc4pac\config\profiles
      Profile ID: 1
      Profile name: Plugins
      Plugins folder: C:\Users\USER\Documents\SimCity 4\Plugins
      Cache folder: C:\Users\USER\AppData\Local\io.github.memo33\sc4pac\cache
      
      Server log: null
      ```
    • Like 1
    • Thanks 2

    Share this post


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

    @Allein Thanks. These are fixed with #250

    17 hours ago, Allein said:

    Real RailWay (RRW) Reskin 3rd Party Lot Support on SC4E links toward both version 3.48 and 3.49 with different package names. Is this intended?

    I'm not quite sure what you mean by "different package names". I see the SC4E and STEX entries both point to this metadata file which is ultimately using the more up to date SC4E version. It looks like the STEX version just hasn't been updated to be the same as the SC4E version.

    18 hours ago, Allein said:

    mandelsoft:bnl-cloverleaf-insurances. Failed to extract error, same as the one that was on glenni:mehelia-taarnet-v2 and since as been fixed on that one

    This is an interesting one, and it only applies to the Darknite version. The Maxisnite version is unaffected. The file download from the STEX is marked as a .zip file, but it actually is a .rar file. This is what is causing the failed extraction. Looking at the comments on the file it looks like it's been this way since the start. :dead:

    • Like 1
    • Thanks 1

    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
  • Original Poster
  • Posted:
    Last Online:  
     

    @Allein @nos.17 Thanks for the report and the fixes.

    17 hours ago, nos.17 said:
    On 8/2/2025 at 11:03 PM, Allein said:

    Real RailWay (RRW) Reskin 3rd Party Lot Support on SC4E links toward both version 3.48 and 3.49 with different package names. Is this intended?

    I'm not quite sure what you mean by "different package names". I see the SC4E and STEX entries both point to this metadata file which is ultimately using the more up to date SC4E version. It looks like the STEX version just hasn't been updated to be the same as the SC4E version.

    This one was included in two different channels: The SC4Evermore channel and the Main channel. In the meantime, @Ulisse Wolf has removed the duplicate already. (Originally, when the package was moved from SC4Evermore to the Main channel, I renamed it to make the name a bit shorter and succinct. That's why it appeared under two different names for a while.)

    17 hours ago, nos.17 said:

    This is an interesting one, and it only applies to the Darknite version. The Maxisnite version is unaffected. The file download from the STEX is marked as a .zip file, but it actually is a .rar file. This is what is causing the failed extraction.

    @nos.17 There's a fairly new sc4pac test command which can catch issues like these, especially extraction failures potentially affecting only one variant. Perhaps, it could be useful for your workflow somehow, as otherwise testing each variant manually can be a bit tedious. The test command runs automatically via GH Actions on every new package in the Main channel, but this is not currently the case for the Simtropolis channel.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    13 hours ago, memo said:

    There's a fairly new sc4pac test command

    Thanks for pointing me to this. It will definitely be helpful. I will see what I can figure out for the ST channel.

    • Like 1

    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:  
     

    tried searching to see if i can find a solution, but I did a bunch of installations using this tool, but i dont see a lot of the mods showing up in the menus. For example I installed all the mattb packs, but i dont see them (police statiosn, schools etc etc) or I installed the airport mods and dont see them. same with any manual mods installed in the 075 folder, they also not showing up. 

    I am using the submenu dll mod, is that the issue, I check with the s4pac tool and it gives me the indication that all is installed as expected. what am i missing/doing wrong?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 8/22/2025 at 8:18 PM, dujota said:

    tried searching to see if i can find a solution, but I did a bunch of installations using this tool, but i dont see a lot of the mods showing up in the menus. For example I installed all the mattb packs, but i dont see them (police statiosn, schools etc etc) or I installed the airport mods and dont see them. same with any manual mods installed in the 075 folder, they also not showing up. 

    I am using the submenu dll mod, is that the issue, I check with the s4pac tool and it gives me the indication that all is installed as expected. what am i missing/doing wrong?

    Is your sc4pac pointing to your SimCity 4 plugins folder? Could be that you selected a different plugin folder on initial setup of sc4pac.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, naaap said:

    Is your sc4pac pointing to your SimCity 4 plugins folder? Could be that you selected a different plugin folder on initial setup of sc4pac.

    no its pointing to the right folder, ie: plugin folder, (plugins folder for SimCity 4 inside documents folder, same as before) i also tripple checked the spelling etc. 

    As i had mentioned before, the symptom is that some of the plugins are showing, but most are not. now for comparison, if i just take the sc4pac plugins folder out, and put in my regular folder from before everything works fine and is in the right sdubfolders etc, so it is definetly not the submenus plugin, its either how sc4pac installs them or how sc4 reads the installs from the sc4 setup. 

    Just to be clear the sc4pac plugins and some of the plugins in 075 folder are not showing up. some do, most dont. 

    Share this post


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

    What do you mean by:

    11 hours ago, dujota said:

    if i just take the sc4pac plugins folder out, and put in my regular folder from before everything works fine and is in the right sdubfolders etc

    Usually when installing sc4pac to an existing plugin folder you just keep it. I'm not sure if things have changed, but once you have sc4pac installed you just create the 075 folder in the plugins folder and put your existing plugins into it. Just not the .dll/.dat/.log/etc files that weren't in folders, they just sit in the plugin folder as they were. All the numbered sc4pac folders will remain hidden until you download a plugin that fits that category, then that numbered folder will be created by sc4pac and added to the plugins folder with what you downloaded in it. Sorry if stating things you probably know but just trying to get a baseline.
    Also as you mentioned the submenus plugin. Depending on what you already had in Plugins and what you have just downloaded, a lot of menu items may have moved to other areas. Like you may have downloaded a number of commercial ploppables, these may now show up in the Zoning Tools menu where you would normally select the tool to drag out low/medium/high densities.

    Share this post


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

    hiya guys... i can't seem to get this to work in Windows 10 Professional 64-bit Edition... I have Temurin 21 JRE installed as required, but the prorgam either complains about java NOT being installed, or it gives this error:

     

    c4pac GUI version: 1.3.0
    Sc4pac CLI version: null
    Platform: windows
    Web: false
    OS (Java): null
    OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 19045)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe
    Arguments: []
    
    Error type: /error/unexpected
    Error title: Launching the local sc4pac server failed (1).
    Error detail:     at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    
    
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    
    
        at java.base/java.lang.Thread.run(Unknown Source)
    
    
    
    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:
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    
    
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    
    
        at java.base/java.lang.Thread.run(Unknown Source)
    C:\Games\sc4pac-gui-windows-x64>java --version
    openjdk 21.0.6 2025-01-21 LTS
    OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
    OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)
    
    C:\Games\sc4pac-gui-windows-x64>which java
    C:\Program Files\Eclipse Adoptium\jre-21.0.6.7-hotspot\bin\java.EXE



    This is all very perplexing... is it a firewall issue?  if so, what port(s) are required to be opened? and in what protocol?

    Share this post


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

    @RaccoonFox Thanks for the report. The error message got truncated by sc4pac, including the most relevant part. Could you start the app from your terminal to see the full error message? Simply execute the command:

    C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe

    Your Java version seems to be working correctly. Opening ports shouldn't be needed, as the app runs entirely locally on localhost port 51515.

    On 8/23/2025 at 7:15 PM, dujota said:

    As i had mentioned before, the symptom is that some of the plugins are showing, but most are not.

    @dujota I don't know what's going on there. If you're certain you're using the correct Plugins folder location (which one exactly?), make sure the files installed by sc4pac are actually there in the Plugins folder and not, for example, removed by OneDrive. Avoid using OneDrive for the sc4pac Plugins folder if you're on Windows. On macOS or Linux, make sure the file permissions are set to readable at least.

    Share this post


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

    sure thing!  this is what the program says, even included a screenshot of what happened:

    ```
    Sc4pac GUI version: 1.3.0
    Sc4pac CLI version: null
    Platform: windows
    Web: false
    OS (Java): null
    OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 19045)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe
    Arguments: []

    Error type: /error/unexpected
    Error title: Launching the local sc4pac server failed (unknown reason: 1).
    Error detail: To diagnose the problem, start the application in a terminal und check whether the console output contains any error messages indicating what the problem could be. Alternatively, try the web-app version of the sc4pac GUI.

    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: null
    ```

    image.png.c060cd39f254173a7e5c523a85e60f90.png

    Now, i have tried running the SC4 command-line server on port 47000 and that *does* work (for whatever reason, Windows or one of its services or programs or another program is using port 51515)... but the GUI seems to be hardcoded for port 51515... is there a way to either make a config file to specify which port should be used, or to force it to use another port?


    Okay, so i tried running it again while the server is still running on port 47000 and i get a different error:

    ```
    Sc4pac GUI version: 1.3.0
    Sc4pac CLI version: null
    Platform: windows
    Web: false
    OS (Java): null
    OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 19045)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe
    Arguments: []

    Error type: /error/unexpected
    Error title: Launching the local sc4pac server failed (1).
    Error detail:     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)

        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)


        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)


        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)


        at java.base/java.lang.Thread.run(Thread.java:1583)


    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:
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)

        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)


        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)


        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)


        at java.base/java.lang.Thread.run(Thread.java:1583)
    ```

    image.png.e48b3cf3ba89fab6f6b648e3d8058832.pngimage.png.3fa62fb51866148f4dce9fc59778439a.png

    image.png.9c52666c9ad3bfb9575ec2f479a01313.png
    This is deeply perplexing... 

    Share this post


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

    image.png.9c52666c9ad3bfb9575ec2f479a01313.png
    This is deeply perplexing... 

    @RaccoonFox There are two different errors in your message. The first one is generic and doesn't provide much information. This 2nd one though does, but the error log is truncated. Can you scroll up a bit in your terminal, so I can see the start of the error message printed in the terminal?

    2 hours ago, RaccoonFox said:

    Now, i have tried running the SC4 command-line server on port 47000 and that *does* work (for whatever reason, Windows or one of its services or programs or another program is using port 51515)... but the GUI seems to be hardcoded for port 51515... is there a way to either make a config file to specify which port should be used, or to force it to use another port?

    Yes, the sc4pac-gui.exe supports the same --port "number" argument as the CLI, which you could for example set in the launch options of a desktop shortcut. From sc4pac-gui.exe --help:

    Options
      --port number              Port of sc4pac server (default: 51515)
      --host IP                  Hostname of sc4pac server (default: localhost)
      --launch-server=false      Do not launch sc4pac server from GUI, but connect to external process instead (default: true)
      --profiles-dir path        Profiles directory for sc4pac server (default: platform-dependent), resolved relatively to current directory
      --sc4pac-cli-dir path      Contains sc4pac CLI scripts for launching the server (default: BUNDLEDIR/cli), resolved relative to current directory
      --register-protocol=false  Do not register "sc4pac://" protocol handler in Windows registry (default: true, Windows only).
                                 Disabling this is useful if you manually changed the registry entry.
      -h, --help                 Print help message and exit
    

    If the port is already occupied, the program should detect this, though, and display a corresponding message.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, memo said:

    @RaccoonFox There are two different errors in your message. The first one is generic and doesn't provide much information. This 2nd one though does, but the error log is truncated. Can you scroll up a bit in your terminal, so I can see the start of the error message printed in the terminal?

    Yes, the sc4pac-gui.exe supports the same --port "number" argument as the CLI, which you could for example set in the launch options of a desktop shortcut. From sc4pac-gui.exe --help:

    
    Options
      --port number              Port of sc4pac server (default: 51515)
      --host IP                  Hostname of sc4pac server (default: localhost)
      --launch-server=false      Do not launch sc4pac server from GUI, but connect to external process instead (default: true)
      --profiles-dir path        Profiles directory for sc4pac server (default: platform-dependent), resolved relatively to current directory
      --sc4pac-cli-dir path      Contains sc4pac CLI scripts for launching the server (default: BUNDLEDIR/cli), resolved relative to current directory
      --register-protocol=false  Do not register "sc4pac://" protocol handler in Windows registry (default: true, Windows only).
                                 Disabling this is useful if you manually changed the registry entry.
      -h, --help                 Print help message and exit
    

    If the port is already occupied, the program should detect this, though, and display a corresponding message.

    That's just me running the CLI server without a port argument. it defaults to port 51515 and then craps itself becuase it can't be used:

     

    C:\Games\sc4pac-gui-windows-x64>java -jar C:\GAMES\sc4pac-gui-windows-x64\cli\sc4pac-cli.jar server
    Exception in thread "main" Exception in thread "zio-fiber-671905334" java.net.BindException: Address already in use: bind
            at java.base/sun.nio.ch.Net.bind0(Native Method)
            at java.base/sun.nio.ch.Net.bind(Unknown Source)
            at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source)
            at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
            at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
            at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:561)
            at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1331)
            at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600)
            at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579)
            at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:972)
            at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:259)
            at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:380)
            at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
            at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
            at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
            at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: java.net.BindException: Address already in use: bind
            at java.base/sun.nio.ch.Net.bind0(Native Method)
            at java.base/sun.nio.ch.Net.bind(Unknown Source)
            at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source)
            at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
            at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
            at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:561)
            at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1331)
            at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600)
            at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579)
            at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:972)
            at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:259)
            at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:380)
            at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
            at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
            at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
            at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.base/java.lang.Thread.run(Unknown Source)

    attempting to force the GUI to run on port 47000 returns the same error:

     

    ```
    Sc4pac GUI version: 1.3.0
    Sc4pac CLI version: null
    Platform: windows
    Web: false
    OS (Java): null
    OS (Dart): windows - "Windows 10 Pro" 10.0 (Build 19045)
    Dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
    Exe: C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe
    Arguments: [--port, 47000]
    
    Error type: /error/unexpected
    Error title: Launching the local sc4pac server failed (1).
    Error detail: 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
    
    
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    
    
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    
    
    	at java.base/java.lang.Thread.run(Thread.java:1583)
    
    
    
    Init phase: InitPhase.connecting
    Authority: localhost:47000
    Authenticated: null
    Profiles config folder: null
    Profile ID: null
    Profile name: null
    Plugins folder: null
    Cache folder: null
    
    Server log:
    	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
    
    
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    
    
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    
    
    	at java.base/java.lang.Thread.run(Thread.java:1583)
    ```

     

    Share this post


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

    @RaccoonFox Use netstat -ano to find out which process is listening on the ports 51515 and 47000. Then kill those processes, especially if they are older instances of sc4pac.

    Then:

    a) Try starting the GUI from the terminal, e.g. using:

    C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe --port 47000

    b) Alternatively, since you seem to be able to run the server from the CLI, start the server from the CLI

    C:\Games\sc4pac-gui-windows-x64\cli\sc4pac server --port 47010 --auto-shutdown=true

    and then in another terminal start the GUI with

    C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe --port 47010 --launch-server=false

    c) There are a few reports that the app crashes at start-up if it fails to determine the profiles directory. If that's the case, try setting it explicitly, e.g.:

    C:\Games\sc4pac-gui-windows-x64\sc4pac-gui.exe --port 47020 --profiles-dir %AppData%\io.github.memo33\sc4pac\config\profiles

     

    • Like 1

    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