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

Android course catalog does not download data #6288

Closed
drewvolz opened this issue Aug 7, 2022 · 4 comments · Fixed by #6294
Closed

Android course catalog does not download data #6288

drewvolz opened this issue Aug 7, 2022 · 4 comments · Fixed by #6294

Comments

@drewvolz
Copy link
Member

drewvolz commented Aug 7, 2022

The course catalog does not appear to download courses on android. iOS works fine.

@drewvolz drewvolz changed the title Android course search does not download data Android course catalog does not download data Aug 7, 2022
@drewvolz
Copy link
Member Author

drewvolz commented Aug 7, 2022

I have an answer as to what is going on. Requests to stolaf.github.io redirect to stolaf.dev.

We are returned a 301 Moved Permanently response.

iOS is able to follow it, Android is not following the redirect.

@drewvolz
Copy link
Member Author

drewvolz commented Aug 7, 2022

So maybe it is not a redirect issue?

Normally, fetch transparently follows HTTP-redirects, like 301, 302 etc.
https://javascript.info/fetch-api#redirect

I am able to fix this locally by changing urls.ts

- export const COURSE_DATA_PAGE = 'https://stodevx.github.io/course-data/'
+ export const COURSE_DATA_PAGE = 'https://stolaf.dev/course-data/'

- export const INFO_PAGE = 'https://stodevx.github.io/course-data/info.json'
+ export const INFO_PAGE = 'https://stolaf.dev/course-data/info.json'

- export const GE_DATA = 'https://stodevx.github.io/course-data/data-lists/valid_gereqs.json'
+ export const GE_DATA = 'https://stolaf.dev/course-data/data-lists/valid_gereqs.json'

- export const DEPT_DATA = 'https://stodevx.github.io/course-data/data-lists/valid_departments.json'
+ export const DEPT_DATA = 'https://stolaf.dev/course-data/data-lists/valid_departments.json'

- export const TIMES_DATA = 'https://stodevx.github.io/course-data/data-lists/valid_times.json'
+ export const TIMES_DATA = 'https://stolaf.dev/course-data/data-lists/valid_times.json'

@hawkrives
Copy link
Member

hawkrives commented Aug 8, 2022

Is it an RN 0.68 issue? Since they ship the fetch-to-native shim…

@drewvolz
Copy link
Member Author

drewvolz commented Aug 8, 2022

Here are the networking issues for 0.68

Known Issues with fetch and cookie based authentication

The following options are currently not working with fetch

  • redirect:manual
  • credentials:omit

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

Successfully merging a pull request may close this issue.

2 participants