xref: /expo/docs/pages/eas-update/debug.mdx (revision 4aaacb05)
1---
2title: Debug EAS Update
3sidebar_title: Basic
4description: Learn how to debug EAS Update.
5---
6
7import ImageSpotlight from '~/components/plugins/ImageSpotlight';
8import { Terminal } from '~/ui/components/Snippet';
9
10This guide shows how to verify our configuration so that we can find the source of problems like an app not showing a published update. It's important to tell the current state of our app at any given time, so EAS Update was built with this in mind. Once we know which updates are running on which builds, we can make changes so that our apps are in the state we expect.
11
12> If we are not using EAS Build, our Deployments page will be empty. Follow the guide on [debugging configuration without EAS Build](/eas-update/debug-advanced/#configuration-without-eas-build) instead.
13
14## Go to the Deployments page
15
16The EAS website has a [Deployments page](https://expo.dev/accounts/[account]/projects/[project]/deployments) that shows the current state of our app. The term _deployment_ refers to a group of builds and their corresponding updates. If we've made builds and updates with EAS, we can see our project's status on the website in the Deployments tab.
17
18<ImageSpotlight
19  alt="Deployments tab"
20  src="/static/images/eas-update/deployments-website-tab.png"
21  style={{ maxWidth: 400 }}
22/>
23
24## Common problems
25
26The following section describes common problems and how to fix them. Below is a diagram of how EAS Update works and the spots that are useful to inspect when finding the root cause of an issue. In the following sections, we'll inspect and verify these spots and more.
27
28<ImageSpotlight alt="Map of debugging spots" src="/static/images/eas-update/debug-map.png" />
29
30### Unexpected channel
31
32<ImageSpotlight
33  alt="Deployment has unexpected channel"
34  src="/static/images/eas-update/deployments-wrong-channel.png"
35  style={{ maxWidth: 600 }}
36/>
37
38If the deployment channel is unexpected, it means our build was not built with the correct channel. To fix this, [configure our channel](/#configure-channel) and rebuild our app.
39
40### Unexpected runtime version
41
42<ImageSpotlight
43  alt="Deployment has unexpected runtime version"
44  src="/static/images/eas-update/deployments-wrong-runtime.png"
45  style={{ maxWidth: 600 }}
46/>
47
48If the deployment runtime version is unexpected, it means our build was not built with the correct runtime version. To fix this, [configure our runtime version](/#configure-runtime-version) and rebuild our app.
49
50### Unexpected branch
51
52<ImageSpotlight
53  alt="Deployment has unexpected branch"
54  src="/static/images/eas-update/deployments-wrong-branch.png"
55  style={{ maxWidth: 600 }}
56/>
57
58If the deployment has an unexpected branch, we need to [map our channel to the correct branch](/#map-channel-to-branch).
59
60### Missing updates
61
62<ImageSpotlight
63  alt="Deployment has no updates"
64  src="/static/images/eas-update/deployments-no-updates.png"
65  style={{ maxWidth: 600 }}
66/>
67
68The displayed deployment does not have any updates. To fix this, [publish an update to the branch](/#publish-update). If an update was already published, check the [Updates page](https://expo.dev/accounts/[account]/projects/[project]/updates) to make sure it matches the runtime version of our build.
69
70### Missing branch
71
72<ImageSpotlight
73  alt="Deployment has no branch"
74  src="/static/images/eas-update/deployments-no-branch.png"
75  style={{ maxWidth: 600 }}
76/>
77
78The displayed deployment has the correct channel, but it is not linked to a branch. To fix this, [map the channel to the correct branch](/#map-channel-to-branch).
79
80### Missing deployment
81
82If our deployment is not displayed, it means our build is not configured properly for EAS Update. To fix this, [configure our channel](/#configure-channel), [configure our runtime version](/#configure-runtime-version) and verify our [general configuration](/eas-update/debug-advanced/#verifying-app-configuration). We'll need to rebuild our app after making these changes.
83
84## Solutions
85
86### Configure channel
87
88To verify that a build has a specific channel, make sure our build profile in **eas.json** has a channel property:
89
90```json eas.json
91{
92  "build": {
93    "preview": {
94      "distribution": "internal",
95      "channel": "preview"
96    },
97    "production": {
98      "channel": "production"
99    }
100  }
101}
102```
103
104Then, we can run a command like `eas build --profile preview` to create a build with a channel named "preview".
105
106### Configure runtime version
107
108To verify our runtime version, we make sure our app config (**app.json**/**app.config.js**) has a `runtimeVersion` property:
109
110```json app.json
111{
112  "expo": {
113    "runtimeVersion": {
114      "policy": "sdkVersion"
115    }
116  }
117}
118```
119
120By default, it is `{ "policy": "sdkVersion" }`, but we can change our runtime to [use a different policy or a specific version](/eas-update/runtime-versions). Then, we can run a command like `eas build --profile preview` to create a build with the runtime version we expect.
121
122### Map channel to branch
123
124If the channel is not mapped to the branch we expect, we can change the link with:
125
126<Terminal
127  cmd={[
128    '# eas channel:edit [channel-name] --branch [branch-name]',
129    '',
130    '',
131    '# Example',
132    'eas channel:edit production --branch release-1.0',
133  ]}
134/>
135
136If our branch is not listed, we can create a new branch with `eas branch:create`.
137
138### Publish update
139
140To create and publish an update, we can run the following command:
141
142<Terminal cmd={['$ eas update']} />
143
144After publishing, the output will display the branch and the runtime version. This information can help us verify that we're creating an update with the configuration we expect.
145
146## Next steps
147
148Read the [advanced guide](/eas-update/debug-advanced) to debug EAS Update when the basic steps don't resolve your issue.
149