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

Unable to use iOS application to login to backend server #3306

Open
simmytruong opened this Issue Sep 30, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@simmytruong

simmytruong commented Sep 30, 2018

Hi,

I am trying to make my own Docker image and I follow up the instruction at:
http://ushahidi.s3.amazonaws.com/downloads/community_docs/Ushahidi_Platform_v3_Manual.pdf
and refer the https://github.com/ushahidi/platform-release/releases/download/v3.12.3/ushahidi-platform-release-v3.12.3.tar.gz

Rigt now, I can bring up my ushahidi_client and ushahidi_platform to work in the same docker container since I can use web browser to login to my site without any problem.

But there is a problem when I use my iPhone to install ushahidi application to add the backend url, and I encounter the issue:
issue

This is my setup:

  • client root dir: /var/www/html
  • backend root dir: /var/www/html/platform/httpdocs
  • I am using apache to host native codes
  • I put the config.json under /var/www/html/platform/httpdocs
  • I can use a browser like chrome to go to http://myushahidi.domain.com without issue
  • But my backend is placing at http://myushahidi.domain.com/platform, if I use this backend url for my iphone, it will display the error as the image

Please help to have an advice

@rowasc rowasc self-assigned this Oct 2, 2018

@rowasc

This comment has been minimized.

Show comment
Hide comment
@rowasc

rowasc Oct 3, 2018

Contributor

Hi, sorry I was trying to check-in on this issue internally and didn't get back to you yesterday (which is why I self-assigned it)

@dalezak mentioned this looks like a CORS issue related to a native http plugin we were using , and that the new mobile app version should resolve this once it goes live
@dalezak could you ping @simmytruong to re-test when the release is out?

Contributor

rowasc commented Oct 3, 2018

Hi, sorry I was trying to check-in on this issue internally and didn't get back to you yesterday (which is why I self-assigned it)

@dalezak mentioned this looks like a CORS issue related to a native http plugin we were using , and that the new mobile app version should resolve this once it goes live
@dalezak could you ping @simmytruong to re-test when the release is out?

@rowasc rowasc added the Mobile label Oct 3, 2018

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong Oct 3, 2018

hi @rowasc Thanks for your update. I am exciting if we can have a release to fix this CORS issue on both iOS and Android.

Thanks,

simmytruong commented Oct 3, 2018

hi @rowasc Thanks for your update. I am exciting if we can have a release to fix this CORS issue on both iOS and Android.

Thanks,

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong Oct 5, 2018

issue
FYI, it is really a CORS issue. Please help to fix soon. Thanks

simmytruong commented Oct 5, 2018

issue
FYI, it is really a CORS issue. Please help to fix soon. Thanks

@rowasc

This comment has been minimized.

Show comment
Hide comment
@rowasc

rowasc Oct 5, 2018

Contributor

Thanks @simmytruong for your patience.
@dalezak just updated the app.
For android it should be already available, but for iOS it depends on their approval process, so he will let us know once it's approved and available in the iOS app store.

Contributor

rowasc commented Oct 5, 2018

Thanks @simmytruong for your patience.
@dalezak just updated the app.
For android it should be already available, but for iOS it depends on their approval process, so he will let us know once it's approved and available in the iOS app store.

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong commented Oct 5, 2018

great thanks @rowasc and @dalezak

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong Oct 6, 2018

hi, I have just upgrade the iOS application to the latest version since last minutes ago.

When I added my site, it displays:

"Problem logging in - An unknown error has occurred" Seems that it is not a CORS issue any more. But no information returns. May you please give an advice?

Thanks,

simmytruong commented Oct 6, 2018

hi, I have just upgrade the iOS application to the latest version since last minutes ago.

When I added my site, it displays:

"Problem logging in - An unknown error has occurred" Seems that it is not a CORS issue any more. But no information returns. May you please give an advice?

Thanks,

@rowasc

This comment has been minimized.

Show comment
Hide comment
@rowasc

rowasc Oct 8, 2018

Contributor

@simmytruong apologies for the delay in answering.
Can you tell us what you see in the application/logs folder, specifically in the file for today/when the error happened ? Any errors there that can be useful in debugging this?

Contributor

rowasc commented Oct 8, 2018

@simmytruong apologies for the delay in answering.
Can you tell us what you see in the application/logs folder, specifically in the file for today/when the error happened ? Any errors there that can be useful in debugging this?

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong Oct 8, 2018

hi @rowasc

Thanks for your update. I will send you the logs soon when I bring up my docker up again.
For easy troubleshoot, I would like you to reproduce my case, it is pretty simple by:

simmytruong commented Oct 8, 2018

hi @rowasc

Thanks for your update. I will send you the logs soon when I bring up my docker up again.
For easy troubleshoot, I would like you to reproduce my case, it is pretty simple by:

@simmytruong

This comment has been minimized.

Show comment
Hide comment
@simmytruong

simmytruong Oct 9, 2018

hi @rowasc

When I check the nginx logs, I can see this message:
"XXX.XXX.XXX.XXX - - [09/Oct/2018:03:13:12 +0000] "GET /config.json HTTP/1.1" 200 290 "-" "Ushahidi/1.12 (iPhone; iOS 12.0; Scale/3.00)""

that means the iOS can get the config.json file. But somehow, it still displays the issue as I mentioned above: "Problem logging in - An unknown error has occurred"

And when I curl to my site:

curl -vvv XXX.XXX.XXX.XXX/config.json

  • Trying XXX.XXX.XXX.XXX...
  • Connected to XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX) port 80 (#0)

GET /config.json HTTP/1.1
Host: XXX.XXX.XXX.XXX
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 200 OK
< Server: nginx/1.10.3
< Date: Tue, 09 Oct 2018 03:15:35 GMT
< Content-Type: application/json
< Content-Length: 290
< Last-Modified: Mon, 08 Oct 2018 23:21:12 GMT
< Connection: keep-alive
< ETag: "5bbbe668-122"
< X-XSS-Protection: 1; mode=block
< Accept-Ranges: bytes
<
{
"client_id": "ushahidiui",
"client_secret": "35e7f0bca957836d05ca0492211b0ac707671261",
"backend_url": "/",
"google_analytics_id": "",
"intercom_app_id": "",
"mapbox_api_key": "pk.eyJ1IjoidXNoYWhpZGkiLCJhIjoiY2lxaXRrbmF5MDdxNmZubmUyN2p6bms5biJ9.o7pmKDIN1EtwMBp1VIzITQ",
"raven_url": ""
}

  • Connection #0 to host XXX.XXX.XXX.XXX left intact

I tried to install with apache2 and my iOS application still display the error

simmytruong commented Oct 9, 2018

hi @rowasc

When I check the nginx logs, I can see this message:
"XXX.XXX.XXX.XXX - - [09/Oct/2018:03:13:12 +0000] "GET /config.json HTTP/1.1" 200 290 "-" "Ushahidi/1.12 (iPhone; iOS 12.0; Scale/3.00)""

that means the iOS can get the config.json file. But somehow, it still displays the issue as I mentioned above: "Problem logging in - An unknown error has occurred"

And when I curl to my site:

curl -vvv XXX.XXX.XXX.XXX/config.json

  • Trying XXX.XXX.XXX.XXX...
  • Connected to XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX) port 80 (#0)

GET /config.json HTTP/1.1
Host: XXX.XXX.XXX.XXX
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 200 OK
< Server: nginx/1.10.3
< Date: Tue, 09 Oct 2018 03:15:35 GMT
< Content-Type: application/json
< Content-Length: 290
< Last-Modified: Mon, 08 Oct 2018 23:21:12 GMT
< Connection: keep-alive
< ETag: "5bbbe668-122"
< X-XSS-Protection: 1; mode=block
< Accept-Ranges: bytes
<
{
"client_id": "ushahidiui",
"client_secret": "35e7f0bca957836d05ca0492211b0ac707671261",
"backend_url": "/",
"google_analytics_id": "",
"intercom_app_id": "",
"mapbox_api_key": "pk.eyJ1IjoidXNoYWhpZGkiLCJhIjoiY2lxaXRrbmF5MDdxNmZubmUyN2p6bms5biJ9.o7pmKDIN1EtwMBp1VIzITQ",
"raven_url": ""
}

  • Connection #0 to host XXX.XXX.XXX.XXX left intact

I tried to install with apache2 and my iOS application still display the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment