Resources

Troubleshooting


Accessing source maps

Update your configuration to include unstable.minify = false and unstable.dump_build = true.

{
	"builds" {
		"counter" {
			"script": "counter.ts",
			"access": "public",
			"unstable": {
				"minify": false,
				"dump_build": true
			}
		}
	}
}
rivet.json

After you deploy again, you'll see a new line in your output:

$ rivet deploy
...etc...
[Build Path] /var/folders/hh/qn66rcl906gg79xjk27qhg900000gn/T/.tmpX5Jcer
...etc...
Command Line

Inside the build folder printed above (e.g. /var/folders/hh/qn66rcl906gg79xjk27qhg900000gn/T/.tmpX5Jcer), you'll find both:

  • index.js The file that's running on the server. You can manually look up your backtraces in this file.
  • index.js.map The source map for your code. You can look up the backtrace in this

Resolving a location in the source map

To look up the location file:///index.js:3754:17, you can:

  1. cd to the build path (see above)

  2. Run:

    $ npx source-map-cli resolve index.js.map 3754 17
    Maps to ../../../../../../Users/nathan/rivet/ee/oss/examples/counter/counter.ts:39:14
    
        console.log(new Error("foo"));
                ^
    
    Command Line

Bad Gateway when making request to actor

This indicates that your actor's HTTP server is:

  • Not responding to requests
  • Is respondign with invalid data
  • Your actor is crashing when receing the request or on startup

Validate that:

  • Your server is listening on the correct port (e.g. for port http, read the port from PORT_HTTP)
  • Your server starts immediately when the actor starts (i.e. don't run async code before starting the HTTP server)
  • You're not using HTTPS for your server (Rivet Guard handles this for you)

If using the actor SDK, this likely an issue with the underlying Rivet library and should be reported on GitHub here.


404 page not found when making request to actor

This indicates that there is no actor running for the given address. This often indicates that your actor has crashed and no longer exists.

Validate that:

  • Your actor is not crashing by checking the logs
  • The address is exactly what's returned from the Rivet API