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

fix(odd): pretend to be online all the time #13746

Merged
merged 8 commits into from
Oct 10, 2023

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Oct 9, 2023

For some reason, when the ODD starts and the robot boots while not connected to any network, some (some!) requests to localhost will fail. It's really strange. One thing that seems to help is pretending to be online by overriding the navigator.onLine browser api to always return true.

Testing

  • Boot the odd with no network connected and see if stuff works I guess

Closes RQA-1754

@sfoster1 sfoster1 requested a review from shlokamin October 9, 2023 21:21
@sfoster1 sfoster1 requested review from a team as code owners October 9, 2023 21:21
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #13746 (58b6edd) into chore_release-7.0.1 (9342034) will decrease coverage by 0.01%.
Report is 2 commits behind head on chore_release-7.0.1.
The diff coverage is 20.00%.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.0.1   #13746      +/-   ##
=======================================================
- Coverage                71.24%   71.23%   -0.01%     
=======================================================
  Files                     2429     2430       +1     
  Lines                    68430    68443      +13     
  Branches                  8040     8040              
=======================================================
+ Hits                     48755    48758       +3     
- Misses                   17776    17786      +10     
  Partials                  1899     1899              
Flag Coverage Δ
app 68.73% <20.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
app/src/App/OnDeviceDisplayApp.tsx 74.07% <100.00%> (+0.99%) ⬆️
app/src/App/hacks.ts 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

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

lgtm, what a journey

app-shell-odd/Makefile Show resolved Hide resolved
app/src/App/OnDeviceDisplayApp.tsx Show resolved Hide resolved
@@ -257,7 +261,7 @@ export const OnDeviceDisplayApp = (): JSX.Element => {

// TODO (sb:6/12/23) Create a notification manager to set up preference and order of takeover modals
return (
<ApiHostProvider hostname="localhost">
<ApiHostProvider hostname="127.0.0.1">
Copy link
Member

Choose a reason for hiding this comment

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

i guess this doesnt hurt but probably not necessary anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah... i like having it though

@sfoster1 sfoster1 merged commit dc4fe46 into chore_release-7.0.1 Oct 10, 2023
18 checks passed
@sfoster1 sfoster1 deleted the fix-offline-odd branch October 10, 2023 16:28
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.

3 participants