Closed xavierlvll closed 1 year ago
Thank you for reporting this, I will try to look into it ASAP.
I've updated my server to latest TShock and could run the plugin with no issues.
Could you state what exactly is wrong? Also, please post your server log and config.
[11/26/22 17:57:10] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[11/26/22 17:57:10] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe
[11/26/22 17:57:10] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True)
[11/26/22 17:57:10] [Server API] Verbose: Mono: False
[11/26/22 17:57:12] [Server API] Error: Startup aborted due to an exception in the Server API initialization:
System.InvalidOperationException: Failed to load assembly "IRCrarria.dll".
---> System.InvalidOperationException: Could not create an instance of plugin class "IRCrarria.IRCrarria".
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\tshock\ircrarria.toml'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at IRCrarria.IRCrarria..ctor(Main game)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 397 --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 405 --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 414 at TerrariaApi.Server.ServerApi.Initialize(String[] commandLineArgs, Main game) in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 118 at TerrariaApi.Server.HookManager.InitialiseAPI() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/HookManager.cs:line 29 [11/26/22 17:58:00] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started. [11/26/22 17:58:00] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe [11/26/22 17:58:00] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True) [11/26/22 17:58:00] [Server API] Verbose: Mono: False [11/26/22 17:58:00] [Server API] Error: Startup aborted due to an exception in the Server API initialization: System.InvalidOperationException: Failed to load assembly "IRCrarria.dll". ---> System.InvalidOperationException: Could not create an instance of plugin class "IRCrarria.IRCrarria". ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\tshock\ircrarria.toml'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.IO.File.ReadAllText(String path) at IRCrarria.IRCrarria..ctor(Main game) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 397
--- End of inner exception stack trace ---
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 405
--- End of inner exception stack trace ---
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 414
at TerrariaApi.Server.ServerApi.Initialize(String[] commandLineArgs, Main game) in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 118
at TerrariaApi.Server.HookManager.InitialiseAPI() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/HookManager.cs:line 29
[11/26/22 17:58:24] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[11/26/22 17:58:24] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe
[11/26/22 17:58:24] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True)
[11/26/22 17:58:24] [Server API] Verbose: Mono: False
[11/26/22 17:58:27] [Server API] Info: Plugin TShock v5.1.3.0 (by The TShock Team) initiated.
[11/27/22 11:17:18] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[11/27/22 11:17:18] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe
[11/27/22 11:17:18] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True)
[11/27/22 11:17:18] [Server API] Verbose: Mono: False
[11/27/22 11:17:19] [Server API] Error: Startup aborted due to an exception in the Server API initialization:
System.InvalidOperationException: Failed to load assembly "IRCrarria.dll".
---> System.InvalidOperationException: Could not create an instance of plugin class "IRCrarria.IRCrarria".
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not find file 'C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\tshock\ircrarria.toml'.
File name: 'C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\tshock\ircrarria.toml'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at IRCrarria.IRCrarria..ctor(Main game)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 397
--- End of inner exception stack trace ---
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 405
--- End of inner exception stack trace ---
at TerrariaApi.Server.ServerApi.LoadPlugins() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 414
at TerrariaApi.Server.ServerApi.Initialize(String[] commandLineArgs, Main game) in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs:line 118
at TerrariaApi.Server.HookManager.InitialiseAPI() in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/HookManager.cs:line 29
[11/30/22 19:02:38] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[11/30/22 19:02:38] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe
[11/30/22 19:02:38] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True)
[11/30/22 19:02:38] [Server API] Verbose: Mono: False
[11/30/22 19:02:38] [Server API] Info: Plugin TShock v5.1.3.0 (by The TShock Team) initiated.
[11/30/22 19:02:38] [Server API] Info: Plugin IRCrarria v1.3.0.0 (by lemon-sh) initiated.
[11/30/22 19:02:54] [Server API] Error: ===================================================================================
[11/30/22 19:02:54] [Server API] Error: An unhandled exception has occured in TSAPI, and a crash report will be generated
[11/30/22 19:02:54] [Server API] Error: Generating a crash report, please wait...
[11/30/22 19:02:54] [Server API] Error: Could not generate a crash report.
[11/30/22 19:02:54] [Server API] Error: Please upload the crash file and report it at http://tshock.co/
[11/30/22 19:02:54] [Server API] Error: The process will terminate.
[11/30/22 19:02:54] [Server API] Error: ===================================================================================
[11/30/22 19:03:40] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[11/30/22 19:03:40] [Server API] Verbose: Command line: C:\Users\Xavie\Desktop\TShock-5.1.3-for-Terraria-1.4.4.9-win-x64-Release\TShock.Server.exe
[11/30/22 19:03:40] [Server API] Verbose: OS: Microsoft Windows NT 10.0.19044.0 (64bit: True)
[11/30/22 19:03:40] [Server API] Verbose: Mono: False
[11/30/22 19:03:41] [Server API] Info: Plugin TShock v5.1.3.0 (by The TShock Team) initiated.
[11/30/22 19:03:41] [Server API] Info: Plugin IRCrarria v1.3.0.0 (by lemon-sh) initiated.
[11/30/22 19:03:53] [Server API] Error: ===================================================================================
[11/30/22 19:03:53] [Server API] Error: An unhandled exception has occured in TSAPI, and a crash report will be generated
[11/30/22 19:03:53] [Server API] Error: Generating a crash report, please wait...
[11/30/22 19:03:53] [Server API] Error: Could not generate a crash report.
[11/30/22 19:03:53] [Server API] Error: Please upload the crash file and report it at http://tshock.co/
[11/30/22 19:03:53] [Server API] Error: The process will terminate.
[11/30/22 19:03:53] [Server API] Error: ===================================================================================
{ "Settings": { "ServerPassword": "", "ServerPort": 7777, "MaxSlots": 8, "ReservedSlots": 20, "ServerName": "", "UseServerName": false, "LogPath": "tshock/logs", "DebugLogs": false, "DisableLoginBeforeJoin": false, "IgnoreChestStacksOnLoad": false, "AutoSave": true, "AnnounceSave": true, "ShowBackupAutosaveMessages": true, "BackupInterval": 10, "BackupKeepFor": 240, "SaveWorldOnCrash": true, "SaveWorldOnLastPlayerExit": true, "InvasionMultiplier": 1, "DefaultMaximumSpawns": 5, "DefaultSpawnRate": 600, "InfiniteInvasion": false, "PvPMode": "normal", "SpawnProtection": true, "SpawnProtectionRadius": 10, "RangeChecks": true, "HardcoreOnly": false, "MediumcoreOnly": false, "SoftcoreOnly": false, "DisableBuild": false, "DisableHardmode": false, "DisableDungeonGuardian": false, "DisableClownBombs": false, "DisableSnowBalls": false, "DisableTombstones": true, "DisablePrimeBombs": false, "ForceTime": "normal", "DisableInvisPvP": false, "MaxRangeForDisabled": 10, "RegionProtectChests": false, "RegionProtectGemLocks": true, "IgnoreProjUpdate": false, "IgnoreProjKill": false, "AllowCutTilesAndBreakables": false, "AllowIce": false, "AllowCrimsonCreep": true, "AllowCorruptionCreep": true, "AllowHallowCreep": true, "StatueSpawn200": 3, "StatueSpawn600": 6, "StatueSpawnWorld": 10, "PreventBannedItemSpawn": false, "PreventDeadModification": true, "PreventInvalidPlaceStyle": true, "ForceXmas": false, "ForceHalloween": false, "AllowAllowedGroupsToSpawnBannedItems": false, "RespawnSeconds": 0, "RespawnBossSeconds": 0, "AnonymousBossInvasions": true, "MaxHP": 500, "MaxMP": 200, "BombExplosionRadius": 5, "GiveItemsDirectly": false, "DefaultRegistrationGroupName": "default", "DefaultGuestGroupName": "guest", "RememberLeavePos": false, "MaximumLoginAttempts": 3, "KickOnMediumcoreDeath": false, "MediumcoreKickReason": "Death results in a kick", "BanOnMediumcoreDeath": false, "MediumcoreBanReason": "Death results in a ban", "DisableDefaultIPBan": false, "EnableWhitelist": false, "WhitelistKickReason": "You are not on the whitelist.", "ServerFullReason": "Server is full", "ServerFullNoReservedReason": "Server is full. No reserved slots open.", "KickOnHardcoreDeath": false, "HardcoreKickReason": "Death results in a kick", "BanOnHardcoreDeath": false, "HardcoreBanReason": "Death results in a ban", "KickProxyUsers": true, "RequireLogin": false, "AllowLoginAnyUsername": true, "AllowRegisterAnyUsername": false, "MinimumPasswordLength": 4, "BCryptWorkFactor": 7, "DisableUUIDLogin": false, "KickEmptyUUID": false, "TilePaintThreshold": 15, "KickOnTilePaintThresholdBroken": false, "MaxDamage": 1175, "MaxProjDamage": 1175, "KickOnDamageThresholdBroken": false, "TileKillThreshold": 60, "KickOnTileKillThresholdBroken": false, "TilePlaceThreshold": 32, "KickOnTilePlaceThresholdBroken": false, "TileLiquidThreshold": 50, "KickOnTileLiquidThresholdBroken": false, "ProjIgnoreShrapnel": true, "ProjectileThreshold": 50, "KickOnProjectileThresholdBroken": false, "HealOtherThreshold": 50, "KickOnHealOtherThresholdBroken": false, "SuppressPermissionFailureNotices": false, "DisableModifiedZenith": false, "DisableCustomDeathMessages": true, "CommandSpecifier": "/", "CommandSilentSpecifier": ".", "DisableSpewLogs": true, "DisableSecondUpdateLogs": false, "SuperAdminChatRGB": [ 255, 255, 255 ], "SuperAdminChatPrefix": "(Super Admin) ", "SuperAdminChatSuffix": "", "EnableGeoIP": false, "DisplayIPToAdmins": false, "ChatFormat": "{1}{2}{3}: {4}", "ChatAboveHeadsFormat": "{2}", "EnableChatAboveHeads": false, "BroadcastRGB": [ 127, 255, 212 ], "StorageType": "sqlite", "SqliteDBPath": "tshock.sqlite", "MySqlHost": "localhost:3306", "MySqlDbName": "", "MySqlUsername": "", "MySqlPassword": "", "UseSqlLogs": false, "RevertToTextLogsOnSqlFailures": 10, "RestApiEnabled": false, "RestApiPort": 7878, "LogRest": false, "EnableTokenEndpointAuthentication": false, "RESTMaximumRequestsPerInterval": 5, "RESTRequestBucketDecreaseIntervalMinutes": 1, "ApplicationRestTokens": {} } }
here's the config.json and the server log. I also tried the pre release. and the main release wanted to add that it crashes when I load a world not when just booting the server up
Sorry, I meant the plugin config (tshock/ircrarria.toml), not the TShock config (tshock/config.json). Looking at your log, it seems you do not have a plugin config, though.
Have you read the README? It clearly states:
- Create
ircrarria.toml
in your TShock configuration directory (<tshock installation dir>/tshock
) with the following contents: [...]
[host] hostname = "192.168.1.4" port = 6697 ssl = false # change to 'true' if you need TLS skip_cert_validation = false # DANGEROUS! Use only when absolutely required.
[irc] username = "ircrarria" nickname = "ircrarria" channel = "#terraria" prefix = "t!" # IRC command prefix
connect_commands = [ "PRIVMSG NickServ :identify topsecretpwd" ]
[server_details] "Server name" = "Lemon's Terraria Server" "IP & Port" = "127.0.0.1:7777" "this server is" = "very cool"
Could be something on my end with my IRC server
Just found out why it wasn't working. it was user error. I had the port set to 6697. and I am running my irc server on 6667.
Could be user error, but could not get this to work with the latest version of tshock