Errors, Help and Troubleshooting - photonle/Photon-v2 GitHub Wiki

Having a problem with Photon 2? You're in the right place.

Vehicles Won't Spawn or Not Working

If you've just downloaded Photon 2 and nothing appears to be working, you likely did not download the Starter Collection addons from the Photon 2 description.

Missing Models and Textures

[!TIP] Seeing error models on Photon 2's demonstrator vehicles? Make sure you're subscribed the Starter Package collection. You can find a link to this collection at the top of the Photon 2 addon description as well as the Welcome Menu that appeared after you first installed Photon 2 (accessible by clicking Photon 2 -> Open Welcome Menu).

gmod_4QGj7pKd3S

In almost every case, seeing error models or black/pink checkers means you either don't have required addons installed, or you have one or more required addons disabled. This can usually be avoided or resolved in two steps:

1. Check the Required Items

chrome_U2nwUTZgL3

When an addon has required items, they will appear in the sidebar on the right of the addon's Workshop page under a box labeled "REQUIRED ITEMS." A green checkbox will appear next to each item you are subscribed to.

If you have all required items but still see errors, you should make sure you don't have any of the addons disabled. To verify, open Garry's Mod, press ESC to open the menu overlay, then click Addons. Next, click the "Search Subscriptions" text box and type in the name of each required addon. If the addon is disabled, it will appear in a faded-green color and will have an "Enable" button when moving your cursor over it. Click the "Enable" button and then reload the map.

gmod_8dAB1NcFxT

2. Read the Addon Description

Some addons (like Photon 2) do not require other addons per se, but other addons are necessary to enable extra functionality. In Photon 2's case, several addons are required for the demonstrator vehicles to work. However, Photon 2's demonstrator vehicles are optional and generally unnecessary to most users who download Photon 2 because they joined a server that uses it.

In those circumstances, you should check the description. The description is usually a large body of text that explains what the addon is and how to use it. It appears below an addon's title and featured images and can be found by scrolling the page down. Because missing models and textures are a common issue, it is typically directly addressed near the top. However, as reaching the description may have been a challenge as is, it's worth reading the rest of it as you'll likely find relevant information throughout the page.

chrome_LpmJ0LLxtJ (1)

After both steps have been exhausted, you should repeat the process again just to be safe.

If you continue to experience problems, check for specific links or sections that discuss help and support. Larger addons often ask you to post questions or issues in a specific place so they can be assessed by the right people. It also indicates that you have made a good-faith effort to resolve the problem on your own because you've read and understood the information provided.

General Issues

You can look for Photon 2-specific errors using the Garry's Mod Problems menu.

image

Errors originating from Photon 2 will appear in the "photon-2" section.

image

Logging & Errors

Photon 2 uses a work-in-progress internal logging system for information and debugging. It is designed for use by both content developers and users reporting potential bugs.

Log Files

Photon 2 outputs to two different log files. For server logging:

garrysmod/data/photon_v2/sv_log.txt

And for client logging:

garrysmod/data/photon_v2/cl_log.txt

Since Photon 2's components are client-side only, most of the logging activity occurs in cl_log.txt.

Start of CLIENT log file [Photon 2.0.18 (BETA)]

02:38:39        (Library)  Registering [Components] library entry [photon_fedsig_micropulse_ultra<isp20chgr:3>]
02:38:40 [WARN] (Vehicle)  Vehicle target [nonexistent_vehicle] does not appear to exist. Ensure the name is correct and you have the required addons.

Each message is logged with a HH:MM:SS local timestamp, [message type] (e.g. warning) and (origin tag). Informational messages show a blank space instead of an actual message type so messages with problems are easy to identify at a glance in the log file.

Log files are also reset at the start of every server session (or single-player game load).

In-Game Options

image

Options relating to this feature can be accessed from the Photon 2 context menu in any Sandbox-derived gamemode by pressing and holding C, and clicking the "Photon 2" menu at the top, and then moving your cursor to the "Logging & Errors" sub menu.

Display Log in Console

image

This option enables all Photon 2 log messages to also appear in the game console so viewing the dedicated log file for information is not strictly necessary. Due to the volume of messages that may appear, this is only recommended when actively troubleshooting or working on something related to Photon 2.

Display Errors in Chat

image

This option causes caught errors in the Photon 2 logging system to also appear in chat. These messages only appear to the local users who enable them, and are generally errors intentionally thrown by Photon 2 for specific and relevant reasons. (Note that this feature cannot intercept and display all errors related to Photon 2.)

Common Issues

Seeing a Photon 2 error but you're not sure what it means? Check this list for more information. Can't find it, or don't understand? Create a new thread in #v2-support on the Photon Community Discord.

Failed to register...

This means an error occurred while Photon 2 was initializing a library entry.

If you're a general user, you are most likely missing one or more required addons for content you just downloaded. You should:

  1. Check that you are subscribed to every required addon.

image

  1. Verify don't have a required addon disabled.

image

  1. Report the error the addon author.

If you continue to see errors, you should report the problem to the author of the addon. There is possibly a conflict in their code or their addon is incompatible with the latest version of Photon 2.

If you're a content developer and you see this error on your own entry, it means there's a problem with your code and your entry will not be loaded.

Get Support From the Photon Discord

If you need assistance resolving an issue and nothing else on this page has solved it, create a thread in the #v2-support channel on the Photon Community Discord. Please include your cl_log.txt file when making a new issue.

Discord_NW1i22UpKR


Troubleshooting Auto-Refresh

Auto-refresh is a Garry's Mod 13 feature that allows Lua files to be immediately updated whenever the file is saved. This is relied upon by Photon 2's developer workflow in order to function smoothly and productively.

If you find that changes you make aren't being applied when you save, there are variety of possible causes.


1. Invalid Filename

Filenames for vehicles and components must be in all lowercase and contain no spaces or special characters besides underscores. This is most common cause of issues.

Examples of valid filenames:

  • schmals_photon_car.lua
  • schmalscar.lua
  • schmals_car_14.lua
  • 012_my_component.lua

Examples of invalid filenames:

  • Schmals Photon Car.lua
  • Schmals_car.lua
  • my component file.lua

2. Conflicting Filename

Ensure that all of your custom files use a unique filename. The easiest way to do this is by incorporating your own name. If two or more files share the exact same name, they may erratically override one another and cause problems.

Example of a good filename:

schmals_whelen_ion.lua

Example of a bad filename:

whelen_ion.lua

3. Coding Errors

Any code-related errors will (usually) prevent Photon 2 from loading or reloading a content file. The simplest way to check for Photon-related errors is by enabling the option to "Display Errors in Chat" via the Photon 2 context menu.

image

If you have a Lua syntax error (such as a missing a { or }, undeclared variable, etc.), it may appear in chat or it may appear in the console as a generic Lua error.

[!TIP] Beware that the camera SWEP will hide chat, so you may not always realize when errors are being thrown.


4. Unrelated addon errors

image

If you have other, non Photon-related addons that are causing errors, try disabling those addons. Depending on the type of error and when it occurs, it's possible that it's breaking Photon 2's normal initialization process and preventing Photon 2 from functioning as intended.


5. Using macOS

The Garry's Mod auto-refresh feature does not work at all on macOS. There is unfortunately no workaround or alternative solution.


6. Garry's Mod Issue

When you've ruled out all of the above, try simply restarting Garry's Mod. There is a known and longstanding issue where the auto-refresh system may spontaneously stop working altogether.

Additional information about Garry's Mod-related problems with auto refresh can be found on the Garry's Mod Wiki.


7. Test Auto-Refresh

If none of the above has worked, you can perform a test to pinpoint if this issue is related to Photon 2 or if your game/environment is causing the issue. The steps below will guide through creating a generic Lua addon and testing if auto-refresh works with it.

Before starting, ensure Garry's Mod is closed.

1. Create a new folder in addons

Create a new folder in the following directory (replace ... with your Steam's install directory).

.../steamapps/common/GarrysMod/garrysmod/addons/your_new_addon_folder

2. Create a Lua autorun directory

Inside your_new_addon_folder, create two additional folders inside each other.

your_new_addon_folder/lua/autorun

3. Create a new Lua file

Next, create a file with a unique name using only lowercase letters and ending in .lua. In this example, I am using myautoreloadtest.lua

your_new_addon_folder/myautoreloadtest.lua

Open the new file in your text editor (if you're unsure, use Notepad).

4. Paste the following code

-- This Lua file will test your Garry's Mod auto-refresh

if ( SERVER ) then
   print( "\n\n*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/\n" )
   print( "Your auto-refresh test file was just executed on the SERVER." )
   print( "\n*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/\n\n" )
else
   print( "\n\n*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/\n" )
   print( "Your auto-refresh test file was just executed on the CLIENT." )
   print( "\n*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/\n\n" )
end

Now, save the file and open Garry's Mod. Then load into a new single player map.

5. Resave the file and verify it worked

Once you're fully loaded into your single player game, save the file again (try both Save and Save As).

Next, open the Console (press the ~ key) and look for the following:

image

If this works as expected, you should go back through steps 1-3. For good measure, try using a different addons folder name or a different filename on your vehicle or component.

If this did not work, proceed to step 8.


8. Other Considerations

A. Disable Photon 2 and see if the issue persists

If the issue is somehow related to Photon 2, disable the Workshop addon or remove Photon 2 from your addons folder. If Step 7 begins working, it indicates an issue with Photon 2 that you should report to us.

B. Disable other addons

There is a limit to how many Lua files Garry's Mod will load (more precisely, files sent from the server to the client). When this limit is exceeded, you will being to encounter erratic behavior. The exact details of when or how this applies isn't well-documented, however temporarily disabling or removing unused or less-important addons may resolve the problem if you've reached the file limit.

C. Get help from the Photon 2 Discord

Create a new post in #v2-support on the Photon Discord. Please include your log files, information on your operating system, text editor, and the exact path of the file that isn't working.