Skip to content

Troubleshooting

paradigmnomad edited this page Oct 11, 2020 · 8 revisions

If after reading this FAQ thoroughly you still have questions, make sure to include your SMAPI log. I typically ignore posts for help that exclude this. I ignore all help questions that come through private message. I've included some basic JsonAssets troubleshooting but the official documentation should be consulted when making a pack.

Contents

Install

  1. Install the latest version of SMAPI.
  2. Install this mod from Nexus mods.
  3. Unzip any JsonAssets content packs into Mods to install them.
  4. Run the game using SMAPI.

Do not use Vortex to install and of the PPJA packs as this may cause errors.

General Troubleshooting

Before posting on the modpage or reporting a bug make sure you have verified you have done these basic steps first:

  • You have the latest version of Json Assets and optionally Producer Framework Mod - including their dependencies.
  • You have the latest version of SMAPI that corresponds to your version number.
  • You have the latest version of Stardew Valley and are not using a pirated copy.
  • You have all dependencies. SMAPI will notify you at the top of the log if a content pack didn't load due to a missing dependency.
  • Folders are placed in the correct locations. This is the number one reason why people report errors.
  • Double check to make sure you don't have two of the name folder. Example: [JA] Fresh Meat and [JA] Fresh_Meat are the same content pack but with a name change.
  • Make sure there aren't copies of folders inside packs. Example: [JA] Fruits and Veggies/Objects/Aloe & Aloe-copy will produce the exception injecting duplicate key error. If you see this it is safe to delete all folders with -copy in the name.
    • The last two errors are easy to overlook. Selecting the Trace box on the SMAPI log parser page can help you see if an item is being assigned two or more IDs. Example

Can't Craft Certain Machines

Artisan Valley 3.0 changed some machines to be unlocked after reaching a certain skill level. These span across all skill levels and skills but concentrate heavily in farming and foraging. You can read about unlocked conditions here.

We also migrated some machines over to the vanilla machines since we now have that ability. This is intentional.

Common Error Messages

This section is for some of the most common errors people experience with using a content pack. If you are unsure which one you're experiencing, but see read text in the SMAPI console and on the log you can cross reference to these errors. Your error may look slightly different but the general principal is the same.

Troubleshooting PPJA Content Packs for Json Assets

Exception Injecting Given Key

Exception injecting cooking recipe for Bulgogi: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at JsonAssets.Mod.ResolveObjectId(Object data) in G:\StardewValley\Mods\JsonAssets\Mod.cs:line 336
   at JsonAssets.Data.ObjectData.Recipe_.GetRecipeString(ObjectData parent) in G:\StardewValley\Mods\JsonAssets\Data\ObjectData.cs:line 60
   at JsonAssets.ContentInjector.Edit[T](IAssetData asset) in G:\StardewValley\Mods\JsonAssets\ContentInjector.cs:line 98

Solution: There is something missing from the recipe. This is caused by not installing a dependency or typing in an item ID/name wrong. Install the dependencies (often listed on the download page and in the manifest.json) or open up the .json file and see if you typed something wrong if you edited the file.

Exception Injecting Duplicate Key

This error presents itself in different ways. Below are some examples of this type of error. You may also see: Resolving for ________ which we don't have? Before any of these errors.

Cooking Recipe
Exception injecting cooking recipe for Bacon: System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at JsonAssets.ContentInjector.Edit[T](IAssetData asset) in G:\StardewValley\Mods\JsonAssets\ContentInjector.cs:line 99Exception i
This mod failed in the SpecialisedEvents.UnvalidatedUpdateTick event. Technical details: 
System.ArgumentException: An item with the same key has already been added.
  at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
  at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
  at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
  at JsonAssets.Mod.AssignIds(String type, Int32 starting, IList`1 data)
  at JsonAssets.Mod.afterLoad(Object sender, EventArgs args)
  at JsonAssets.Mod.unsafeUpdate(Object sender, EventArgs args)
  at StardewModdingAPI.Framework.Events.ManagedEvent.Raise() in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 126
Object Information
Exception injecting object information for Beeswax: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at JsonAssets.ContentInjector.Edit[T](IAssetData asset)

Solution: There is already an item with that name. This can happen when:

  • using mods that have the same items/item names
  • having two of the same file in different locations or
  • accidentally naming something with the same name

Double check all folders and rename/delete accordingly. Depending on which version of a pack you installed there may be different folder names for the same product. Ex. PumpkinPie and Pumpkin Pie are the same object but will appear in separate folders due to the space. Make sure to install proper compatibility patches when available.

Maximum size 4096

This issue should be resolved as limits have been removed. If you are still experiencing this you'll need to update JsonAssets & SpaceCore.

Example Error
Mod crashed when editing asset 'TileSheets\Craftables', which may cause errors in-game. Error details:
System.NotSupportedException: XNA Framework HiDef profile supports a maximum Texture2D size of 4096.
at Microsoft.Xna.Framework.Graphics.ProfileCapabilities.ThrowNotSupportedException(String message, Object arg1, Object arg2)
at Microsoft.Xna.Framework.Graphics.Texture2D.ValidateCreationParameters(ProfileCapabilities profile, Int32 width, Int32 height, SurfaceFormat format, Boolean mipMap)
at Microsoft.Xna.Framework.Graphics.Texture2D.CreateTexture(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipMap, UInt32 usage, _D3DPOOL pool, SurfaceFormat format)
at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height)
at BlueberryMushroomMachine.Editors.BigCraftablesTilesheetEditor.Edit[T](IAssetData asset) in E:\Dev\Projects\SDV\Projects\BlueberryMushroomMachine\BlueberryMushroomMachine\Editors\BigCraftablesTilesheetEditor.cs:line 29
at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyEditors[T](IAssetInfo info, IAssetData asset) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\ContentManagers\GameContentManager.cs:line 358

This is a rare error and should not effect crops, trees, or clothing but may still effect other categories. Stardew Valley's max texture size is 4096.

Solution: You have too many of something installed. The first part of the error will tell you what the offending category is: Mod crashed when editing asset 'TileSheets\Craftables' this means the BigCraftables are extending past the limit of 4096. Removing mods is the only solution to this problem.

Items Appearing Incorrectly

This error will not necessarily have an error in the console window.

ID scrambling is a fact of life with JA. We're not sure what causes it but uninstalling packs & installing new ones is often a common feature. If the name of an object is wrong Example: Parsley Wine, even though the name is wrong the object retains its sell value of what it actually is. Selling these items will resolve that issue.

Can't Plant Seeds

This error will not necessarily have an error in the console window.

There can be numerous reasons for being unable to plant seeds:

  • planting out of season
  • having two of the same file - see General Troubleshooting
  • installing with Vortex
  • [For Modders] creating a sprite that is bigger than the target

No idea what _____ is!

[Json Assets] No idea what 'Sesame Seeds' is!

Solution: You may be missing a dependency or there is a leftover item in a recipe that's name has been changed/moved to vanilla. Your game will still work as intended with this error.

Unrelated Issues

These are issues that some users report that are not related to JsonAssets. Please stop reporting these, I cannot fix them because the issue is with another mod.

NPCs Stay In Their Rooms All Day

Solution: This is a known bug with Longevity. Every user who has reported this issue has Longevity installed. Removing Longevity will fix this. People who aren't using JsonAssets also are reporting this issue.

See Also