Node.js troubleshooting guide¶
Sometimes issues may arise that interfere with smooth running. We've done our best to gather a list of some more common issues and possible solutions.
System error messages¶
Error | Description | How to fix |
---|---|---|
Encountered an issue with a Lightrun PII Redaction pattern. Please contact your admin for support. | You cannot add an action to your code because a faulty PII redaction pattern was defined. | Try the following:
|
A script matching the source file was not found loaded on the debuggee | Agent could not find requested filename. | Try the following:
|
Could not determine the output file associated with the transpiled input file | Missing TypeScript mapping files. | Try the following:
|
Multiple files match the path specified | There is more than 1 possible match for the requested filename. | Try the following:
|
Couldn't evaluate the given condition as it might affect app performance. | An action may be placed on a frequently called line or if the condition takes a considerable amount of time to compute. | Try the following:
|
The agent couldn't find the given filename. Verify the action filename. | The Agent couldn't find the file. | Try the following:
|
Missing TypeScript mapping files. Make sure to include these in your remote app. | Missing TypeScript mapping files. | Try the following:
|
Expression not allowed. | Condition expression may have issues. The provided expression contains a syntax error or may have potential side effects | Try the following:
|
Invalid snapshot position: % | Invalid row number. | Try the following:
|
More than one possible match was found for the requested filename. Provide an absolute or distinguished path. | Filename ambiguity. | Try the following:
|
Syntax error in condition: % | Condition has an syntax error. The provided condition contains a syntax error. | Try the following:
|
Unable to set breakpoint in & | A snapshot is set on an invalid location. | Try the following:
|
A script matching the source file was not found loaded on the debugger | Agent could not find requested filename. | Try the following:
|
Could not determine the output file associated with the transpiled input file | Missing TypeScript mapping files. | Try the following:
|
Multiple files match the path specified | There is more than 1 possible match for the requested filename. | Try the following:
|
General issue¶
Self-signed certificate is blocked¶
Troubleshooting methods for this issue may vary depending on browser, browser version or operating system.
The following links address most of the certificate issues associated with popular browsers and operating systems:
Plugin issues¶
Can't see the Lightrun plugin sidebar¶
If you're unable to see the plugin from your IDE, verify that:
- The WebStorm or IntelliJ IDE default is not set to Collapse all.
- The Lightrun plugin is installed and active.
- Check the plugin's settings at View->Tool Windows->Lightrun.
Can't sign in from the plugin¶
Symptoms
- No connectivity to server (cloud).
- The IDE cannot connect to the server (in Lightrun Cloud deployments or when using app.lightrun.com)
Suggested solutions
Resolve server URL mismatch. Check the Lightrun server URL in the plugin's settings (under the IDE's Preferences / Settings --> Lightrun) and verify that it's the same URL that appears in the browser page from which you're trying to authenticate.
Can't sign in from the browser for the plugin or CLI¶
If you Unable to log in from your browser, check the following issues:
- Verify that the client can communicate with the server (the cloud).
- There may be a problem with the embedded browser in your IDE - From the Lightrun plugin settings menu in the WebStrom or IntelliJ IDE, disable the Use Embedded Browser option and then try logging in again.
Agent issues¶
Agents don't appear in the Agents tab in the Lightrun sidebar¶
If agents don't appear in the plugin, it may be because they are not running on the server where your application is located. If you're sure the agent is running, then the error could be due to connection or authentication issues at the client side.
If you are unable to see agents in the IDE, try the following:
-
Validate that you have selected the correct agent pool.
-
Restart the IDE.
If the agents still fail to appear, contact your administrator for assistance.
The agent could not find the given filename. Verify the action filename¶
This error often occurs when you insert Lightrun actions into external files and Node.js third-party modules, for example, node_modules
because Lightrun does not scan these files for actions by default.
See extraPaths for more information on how to insert Lightrun actions into external files and Node.js third-party modules.
Action issues¶
Unable to see dynamic logs in my IDE¶
Logs only appear in the IDE if piping is configured correctly in the Lightrun plugin. If you are unable to see any logs:
- Verify that the piping configuration is set to either Plugin or Both.
- Check all of the Lightrun Console filters to verify that you haven't filtered out the dynamic logs that you've applied.
Unable to create a new action¶
Symptoms
- You're unable to create a new action.
- An action you create appears red in the IDE.
- The only actions that appear in the IDE are for tags.
- You're unable to find the agent list in the Lightrun plugin.
Suggested solutions
- Verify that you're logged in. Try logging out and then logging back in.
- Verify that you're attempting to insert the action from a line with code in it.
- From the IDE, verify that the cursor is positioned within your code. From the CLI, verify that the line number you used is valid.
- The agent might be down. Ask your account manager to check.
- You're not connected to the correct source code version (the same version currently running with the agent). Try closing the source code and reopening the file, ensuring you open the file directly from the correct source version.
- Your plugin may need to be upgraded to the newest version.
Unable to delete an existing action¶
If you're unable to delete an action, verify that:
- You're logged in.
- The agent you're using is currently running. To verify, try running
list-agents
.
No code found¶
The No code found at line # in <path>
error may occur even if the action (for example, a log) is inserted at a line that contains executable code.
Symptoms and causes
This error typically happens when inserting a log in a code line that doesn't have executable code. The probable cause of the error is that a log action, in most cases, triggers at the line preceding the log insertion position. If the previous line is empty or contains no executable code, then the No code found
error is displayed.
Suggested solution
Try moving the action insertion position to the line following the one for which the log is intended to trigger.
Unable to see actions when using ts-node¶
Symptoms
Snapshots and logs are not getting any hits when using ts-node
.
Suggested solution
We recommend using the TypeScript Compiler (tsc
) instead of ts-node
in production environments. This choice not only ensures a more efficient memory footprint but also avoids generating unnecessary type information. For more information, see Running the Node.js agent in TypeScript applications.
Expression not allowed¶
Lightrun blocks expressions that are considered harmful to your server, can overload the Lightrun agent and server, or expressions that carry a large performance penalty.
This includes:
- Expressions that change the state of your application. i.e., setting object fields, static fields, and changing array elements.
- Expressions that involves calling a native method.
- Expressions involving the creation of a global variable.
- Expressions that implements Division by zero, infinite recursions, out-of-bound reads, and null pointer reference.
- Expressions that halt CPU.
- Expressions that try to access external resources.