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

CapacitorJS testing WIP #308

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

CapacitorJS testing WIP #308

wants to merge 4 commits into from

Conversation

jimmcgaw
Copy link
Collaborator

This feels very close to working, for development mode. Right now the issue is that the app, when running in an emulator, will not reach out to the localhost:8080. I've tried several workarounds from the docs, I haven't found the solution yet.

@elimisteve
Copy link
Member

This feels very close to working, for development mode. Right now the issue is that the app, when running in an emulator, will not reach out to the localhost:8080. I've tried several workarounds from the docs, I haven't found the solution yet.

Meaning the app tries to talk to localhost:8080 inside the emulator rather than localhost:8080 on the host?

@elimisteve
Copy link
Member

@jimmcgaw Can conditional logic be set so that, when running in an emulator, 10.0.2.2:8080 is reached out to instead of localhost:8080 ?

@@ -74,6 +74,7 @@ func ProductionServer(srv *http.Server, httpsAddr, domain string, manager *autoc

func Login(m *miniware.Mapper, pgClient *PGClient) func(w http.ResponseWriter, req *http.Request) {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
//w.Header().Set("Access-Control-Allow-Origin", "*")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the solution to the local emulator access issue. I don't think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

@@ -137,7 +137,6 @@ const ownUserStatusEpic = (action$, store) =>
.map(() => userStatusSent())
)
.catch(error => {
console.error(error);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I was cleaning up my own message here.

"allowNavigation": [
"192.168.1.247:8080/*",
"localhost:8080/*",
"leapchat.org/*"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 📿

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Should probably add www.leapchat.org/*, I'd think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"10.0.2.2:8080/*", I suppose

jimmcgaw and others added 4 commits March 2, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants