Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map doesn't open #3858

Closed
missytake opened this issue May 24, 2024 · 8 comments · Fixed by #3876
Closed

Map doesn't open #3858

missytake opened this issue May 24, 2024 · 8 comments · Fixed by #3876
Labels
blocker This issue is blocking a new release bug Something isn't working

Comments

@missytake
Copy link
Contributor

missytake commented May 24, 2024

  • Operating System (Linux/Mac/Windows/iOS/Android): xubuntu 22.04
  • Delta Chat Version: 1.45.0, installed via .deb
  • Expected behavior: when I click on the map icon on the top right of the selected chat window, the map opens.
  • Actual behavior: nothing happens.
  • Steps to reproduce the problem:
    • open desktop
    • click on the map icon
  • Logs:
Error occurred in handler for 'open-maps-webxdc': {
  code: -1,
  message: 'failed to open file /opt/DeltaChat/resources/app.asar/html-dist/xdcs/maps.xdc\n' +
    '\n' +
    'Caused by:\n' +
    '    Not a directory (os error 20)'
}
@missytake missytake added bug Something isn't working blocker This issue is blocking a new release labels May 24, 2024
@missytake
Copy link
Contributor Author

If I start deltachat-desktop with npm run start, it works.

@missytake
Copy link
Contributor Author

missytake commented May 24, 2024

The path doesn't work:

$ file /opt/DeltaChat/resources/app.asar
/opt/DeltaChat/resources/app.asar: data

There is /opt/DeltaChat/resources/app.asar.unpacked/, but it just contains:

.
└── node_modules
    └── @deltachat
        └── stdio-rpc-server-linux-x64
            ├── deltachat-rpc-server
            └── package.json

3 directories, 2 files

In general the file doesn't seem to be shipped, $ find /opt/ -name maps.xdc` doesn't give any output.

@r10s
Copy link
Member

r10s commented May 24, 2024

just another data point: on mac/sonoma with arm-build (thanks for that, btw!), the map shows up

@Raiden-GH
Copy link

I have the same problem. When I click on the map icon in the bar or on "Open global map" nothing happens. When I click on the gallery icon it is always highlighted along with the map icon.

DC Karten

I found the following suspicious entries in the log:

2024-05-25T09:12:37.241Z renderer ERROR "\nfile:///Applications/DeltaChat.app/Contents/Resources/app.asar/src/renderer/App.tsx:109:10" "Unhandled Rejection:" {"isTrusted":true} {"stack":"Error: Error invoking remote method 'open-maps-webxdc': [object Object]\n at IpcRenderer.invoke (node:electron/js2c/sandbox_bundle:2:49458)","message":"Error invoking remote method 'open-maps-webxdc': [object Object]"}
2024-05-25T09:12:42.429Z renderer ERROR "\nfile:///Applications/DeltaChat.app/Contents/Resources/app.asar/src/renderer/App.tsx:109:10" "Unhandled Rejection:" {"isTrusted":true} {"stack":"Error: Error invoking remote method 'open-maps-webxdc': [object Object]\n at IpcRenderer.invoke (node:electron/js2c/sandbox_bundle:2:49458)","message":"Error invoking remote method 'open-maps-webxdc': [object Object]"}
2024-05-25T09:12:44.145Z renderer ERROR "\nfile:///Applications/DeltaChat.app/Contents/Resources/app.asar/src/renderer/App.tsx:109:10" "Unhandled Rejection:" {"isTrusted":true} {"stack":"Error: Error invoking remote method 'open-maps-webxdc': [object Object]\n at IpcRenderer.invoke (node:electron/js2c/sandbox_bundle:2:49458)","message":"Error invoking remote method 'open-maps-webxdc': [object Object]"}

@missytake
Copy link
Contributor Author

When I click on the gallery icon it is always highlighted along with the map icon.

DC Karten

Same for me.

@Simon-Laux
Copy link
Member

Simon-Laux commented May 25, 2024

probably we need to instruct electron-builder to also put it into the asap.unpacked folder and then additionally adjust the code so it finds it when it is a release, similar to what I did for the rpc server in

if (serverPath.includes('app.asar')) {
// probably inside of electron build
serverPath = serverPath.replace('app.asar', 'app.asar.unpacked')
}

Probably the issue is that electron can deal with those paths, but deltachat core does not understand what the asar archive is so it does not look inside of it.

@Raiden-GH
Copy link

Raiden-GH commented May 25, 2024

I was now able to start DC via terminal.
This messages are displayed there:

(node:2322) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use DeltaChat --trace-warnings ... to show where the warning was created)

Error occurred in handler for 'open-maps-webxdc': {
code: -1,
message: 'failed to open file /Applications/DeltaChat.app/Contents/Resources/app.asar/html-dist/xdcs/maps.xdc\n' +
'\n' +
'Caused by:\n' +
' Not a directory (os error 20)'

@r10s
Copy link
Member

r10s commented May 26, 2024

just another data point: on mac/sonoma with arm-build (thanks for that, btw!), the map shows up

i meanwhile have the same bug as well, not sure what has changed. at least, the bug is consistent now :)

nicodh added a commit that referenced this issue May 27, 2024
Simon-Laux pushed a commit that referenced this issue May 30, 2024
Simon-Laux added a commit that referenced this issue May 30, 2024
* Fix path in package asar

resolves #3858

* add typing to electron-builder config

* add changelog entry

* "manually" copy the xdcs in after pack hook

---------

Co-authored-by: SimonLaux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker This issue is blocking a new release bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

4 participants