You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: e.diffs.map is not a function when reopening old browser session #19217
When trying to reopen an old OpenCode web browser window, I get the following JavaScript error:
TypeError: e.diffs.map is not a function
at Object.fn (http://localhost:4096/assets/session-BdJIdAn0.js:19:50326)
at H2 (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:6835)
at $l (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:6592)
at Df (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8033)
at Q7 (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8914)
at xO (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8286)
at Ir (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8218)
at et (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:3989)
at o (http://localhost:4096/assets/index-Dr5k_2Nz.js:2279:6842)
at http://localhost:4096/assets/session-BdJIdAn0.js:21:39236
Steps to Reproduce
Open OpenCode web interface
Try to reopen an old browser session/window
Environment
OpenCode version: 1.2.27
Browser: Happens in Brave, Chrome, Edge
OS: Windows 11
Additional Context
The error suggests that e.diffs is not an array (or is undefined) when the map function is called. This may be related to session state corruption or an issue with how session data is being deserialized.
I’ve encountered this issue as well. I’m currently on the latest version (1.3.2), and the error persists even after switching computers or browsers; the only time it stops is when I switch to the mobile version.
Reacted by 蒋小小, Abdul Shakoor, あわわわとーにゅ, CyberRookie-X, RokuDoan, Sven, howznguyen, Naufal Ilyasa, Martin Eiber, luck and 7 more
Close the sidebar through application tab: The bug is caused by review sidebar, so if we close that sidebar it works again.
Open Applications tab in chrome dev console
Under storage, click 'local storage' and then the localhost / port on which opencode runs (e.g. http://127.0.0.1:4096)
Find key 'opencode.global.dat:layout' ,then for value, in the json set panelOpened to false for the review key, so "review":{"diffStyle":"split","panelOpened":false}
Reload page
PS: if you cannot find 'opencode.global.dat:layout'. I think the error page removes it sometimes. Then change another key into it and set it to: {"sidebar":{"opened":false,"width":344,"workspaces":{},"workspacesDefault":false},"terminal":{"height":280,"opened":false},"review":{"diffStyle":"split","panelOpened":true},"fileTree":{"opened":false,"width":200,"tab":"all"},"session":{"width":600},"mobileSidebar":{"opened":false},"sessionTabs":{"session_id_left_out_for_github_share":{"all":[],"active":"review"},"session_id_left_out_for_github_share":{"all":[],"active":"review"}},"sessionView":{},"handoff":{}}
I noticed the same behavior. If on the left side there is a project shown in the vertical project bar, the error appears.
the reason we hadn't bundled the webapp into the cli was because we were waiting on our move to node to be complete. we didn't realize many people were using it and the version drift issues are impacting a lot of people
we're going to figure out bundling today so this doesn't keep happening
Reacted by Chris Yang, cty723, mic, Nuno Costa, Unai Carbajo, Ted Moyses, Zhong Haocheng, Riley Connors, Sebastian Quispe, misterpdj and 4 more
Reacted by Damián, Chris Yang, mic, Lukas Murdock, 严浩, Zhong Haocheng and Sang
Reacted by Damián, Chris Yang, mic, Zhong Haocheng, Glenn Dwiyatcita, Tobias Koch, LAIIIHZ and leighboz
Fixed by #19299 - This issue was caused by version drift between the web UI assets served from the CDN and the local server. Version 1.3.3 is going out now and embeds the WebUI directly in the binary, eliminating any version drift between the server and web UI.
Reacted by Alexander Gil Casas, Martin Carpella, Dmitrii, Sven, Chris Yang, Sang, Mina Sameh and Du, Changbin
Activity
zhongruan0522 commentedon Mar 26, 2026
I’ve encountered this issue as well. I’m currently on the latest version (1.3.2), and the error persists even after switching computers or browsers; the only time it stops is when I switch to the mobile version.
lzss433 commentedon Mar 26, 2026
+1
daShuiLuoBo commentedon Mar 26, 2026
+1
rluisr commentedon Mar 26, 2026
+1
CyberRookie-X commentedon Mar 26, 2026
+1
Kevin589981 commentedon Mar 26, 2026
+1
sllavvicc commentedon Mar 26, 2026
+1
CyberRookie-X commentedon Mar 26, 2026
@rekram1-node Can you offer some support for this?
doge-liang commentedon Mar 26, 2026
me too
AlexKilianDT commentedon Mar 26, 2026
+1
kiko-cn commentedon Mar 26, 2026
+1
OneEyedOlaf commentedon Mar 26, 2026
I have same problem either
glorydreamtop commentedon Mar 26, 2026
+1
33 remaining items
xiaomu-software commentedon Mar 26, 2026
+1,我使用的web端,同样的问题。
natewill commentedon Mar 26, 2026
The bug should be completely gone whenever a new release is out
scotty86 commentedon Mar 26, 2026
I noticed the same behavior. If on the left side there is a project shown in the vertical project bar, the error appears.
yetangzhi commentedon Mar 26, 2026
更换更老的版本可以解决嘛?
hdoer commentedon Mar 26, 2026
no
hdoer commentedon Mar 26, 2026
+1
shuvo-paul commentedon Mar 26, 2026
Wellinator commentedon Mar 26, 2026
+1
thdxr commentedon Mar 26, 2026
hey sorry for this. getting fix out now
the reason we hadn't bundled the webapp into the cli was because we were waiting on our move to node to be complete. we didn't realize many people were using it and the version drift issues are impacting a lot of people
we're going to figure out bundling today so this doesn't keep happening
fix(app): add defensive Array.isArray checks for session diffs
fix: add defensive checks for undefined values in diff handling
thdxr commentedon Mar 26, 2026
fixed now - bundling going out in next release
thdxr commentedon Mar 26, 2026
Fixed by #19299 - This issue was caused by version drift between the web UI assets served from the CDN and the local server. Version 1.3.3 is going out now and embeds the WebUI directly in the binary, eliminating any version drift between the server and web UI.
thdxr commentedon Mar 26, 2026
Closing as fixed by #19299