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 for ui crashing when the gmaps api key is incorrect #2406

Closed

Conversation

rishabhsaxena
Copy link
Contributor

Description

When the api key is incorrect/restricted by domain, gmaps mutates the DOM which results in an errored state.
If we have a good way to measure the performance impact, we can take a call for this. Open to other suggestions as well.

fixes #2378

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • manually

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

ofpiyush
ofpiyush previously approved these changes Jan 5, 2021
@rishabhsaxena rishabhsaxena marked this pull request as ready for review January 5, 2021 06:21
@ofpiyush
Copy link
Contributor

ofpiyush commented Jan 5, 2021

@hetunandu @riodeuno If you can find a better solve for this, please help out.

Otherwise, this seems to add 2 checks on every node removal from DOM. (Not sure how to measure the perf hit of that.)

@hetunandu
Copy link
Member

@hetunandu @riodeuno If you can find a better solve for this, please help out.

Otherwise, this seems to add 2 checks on every node removal from DOM. (Not sure how to measure the perf hit of that.)

This fix does not sit well with me. Can we do something more targeted for the maps widget itself?

Copy link
Member

@hetunandu hetunandu left a comment

Choose a reason for hiding this comment

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

Needs a more targeted approach for google maps component only

@rishabhsaxena rishabhsaxena marked this pull request as draft January 13, 2021 05:21
@ofpiyush
Copy link
Contributor

I'm assuming that the objection more design neatness.

Things to figure:

  • Can we add the problem component after verifying that we have a legitimate key? Would that prevent/solve the issue?
    • Eg: Would this also happen when the maps widget goes into loading?
  • How important is the problem to solve?
    • How many users are facing this?
    • Should we spend time trying to dig deeper with the lib/sdk etc.
  • Under what circumstances would we would accept a global solution like this?

@rishabhsaxena
Copy link
Contributor Author

Closing this for now, since this seems like an edge case with using an incorrect gmaps API key. Also these errors are displayed on the console.

@mohanarpit mohanarpit deleted the monkey-patch-for-dom-mutation-resilience branch July 6, 2021 14:17
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.

[Bug] CE : On placing the Map Widget the page crashes
4 participants