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

Investigate ext app for node backend #119

Open
3 tasks done
juliusknorr opened this issue Aug 19, 2024 · 5 comments · May be fixed by #226
Open
3 tasks done

Investigate ext app for node backend #119

juliusknorr opened this issue Aug 19, 2024 · 5 comments · May be fixed by #226
Assignees
Labels
backend: node enhancement New feature or request
Milestone

Comments

@juliusknorr
Copy link
Member

juliusknorr commented Aug 19, 2024

As a replacement for #27 we should see if we can build a AppAPI app https://docs.nextcloud.com/server/latest/admin_manual/ai/app_api_and_external_apps.html that just runs a docker container for the backend.

Started adding this for the local dev environment juliusknorr/nextcloud-docker-dev@a3e7cb8

@juliusknorr juliusknorr self-assigned this Aug 19, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Aug 19, 2024
@juliusknorr juliusknorr assigned hweihwang and unassigned juliusknorr Aug 19, 2024
@juliusknorr juliusknorr moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Aug 19, 2024
@juliusknorr juliusknorr added enhancement New feature or request backend: node labels Aug 22, 2024
@juliusknorr juliusknorr added this to the 1.0 milestone Aug 29, 2024
@hweihwang hweihwang moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Office team Sep 4, 2024
@hweihwang
Copy link
Contributor

Initial efforts for ExApps:

https://github.com/hweihwang/whiteboard_websocket

@hweihwang
Copy link
Contributor

hweihwang commented Sep 30, 2024

Current progress:

  • Using docker-install and dockersocketproxy
  • The ExApp has been built out seems okay (Dockerfile for a express node server with socket.io, appinfo xml configs)
  • Successfully enabled the app and proxied the request at https://nextcloud.local/apps/app_api/proxy/whiteboard_websocket
  • The request to the express HTTP server route works fine.

=> However, I'm facing problems with the socket connection. Both websocket and polling connections are failing. The AppAPI documentation mentions: "There is a limitation of AppAPI ExApp proxy—the WebSocket connections are not supported." I was hoping polling might work, but it doesn't seem to connect.

image

image

@hweihwang
Copy link
Contributor

Updates:

  • When I debugged the Guzzle request in the app_api source, I noticed that the necessary query parameters for the socket connection (EIO, transport, t) are not being proxied. After modifying the code to include these queries, the request now proxies successfully, but some requests still fail while others succeed. I'm investigating why this inconsistency occurs—perhaps there's still missing information needed for the proxy.

=> In the app_api source, I've been modifying the ExAppProxyController a bit to include this to proxy the queries:

$queryParams = $this->request->getRequestUri();
$queryParams = explode('?', $queryParams);
$queryParams = $queryParams[1];
$path = $other . '?' . $queryParams;

image

@hweihwang
Copy link
Contributor

Hi @bigcat88 , Your expertise would be really helpful! Thank you!

@hweihwang
Copy link
Contributor

Fixed by this: nextcloud/app_api#412, thank you @edward-ly , @bigcat88 , @andrey18106

Image

@juliusknorr juliusknorr modified the milestones: 1.0, 2.0 Oct 9, 2024
@hweihwang hweihwang linked a pull request Oct 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: node enhancement New feature or request
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants