> For the complete documentation index, see [llms.txt](https://tivet.gitbook.io/tivet-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tivet.gitbook.io/tivet-docs/resources/troubleshooting.md).

# Troubleshooting

### Accessing source maps <a href="#accessing-source-maps" id="accessing-source-maps"></a>

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
			}
		}
	}
}
```

tivet.json

**Tip**

`unstable.minify = false` is not required, but it maintains symbol names & whitespace to make your backtraces easier to read.

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

```
$ tivet 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 <a href="#resolving-a-location-in-the-source-map" id="resolving-a-location-in-the-source-map"></a>

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/tivet/ee/oss/examples/counter/counter.ts:39:14

       console.log(new Error("foo"));
               ^
   ```

   Command Line

***

### `Bad Gateway` when making request to actor <a href="#bad-gateway-when-making-request-to-actor" id="bad-gateway-when-making-request-to-actor"></a>

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 (Tivet Guard handles this for you)

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

***

### `404 page not found` when making request to actor <a href="#id-404-page-not-found-when-making-request-to-actor" id="id-404-page-not-found-when-making-request-to-actor"></a>

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 Tivet API
