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: SDK crashes when using ParseQuery.include with anonymous user #388

Closed
wants to merge 1 commit into from

Conversation

Werkezeugs
Copy link
Contributor

Hotfix crash for anonym User when using ParseQuery.Include()

For anonym users currently the project crashes with "Object reference not set to an Instance of an object"

  • this only happens if you use a ParseQuery with the .Include("") Keyword
  • Rootcause is serviceHub is null here --> cannot accesss the (serviceHub).Instance

Maybe consider to fix the rootcause, why is serviceHub null here? I couln´t determine yet.
But this code change hotfixes the problem

Hotfix crash for anonym User when using ParseQuery.Include()

For anonym users currently the project crashes with "Object reference not set to an Instance of an object"

+ this only happens if you use a ParseQuery with the .Include("<ParentObject>") Keyword

+ Rootcause is serviceHub is null here --> cannot accesss the (serviceHub).Instance
Copy link

parse-github-assistant bot commented May 25, 2024

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, could you please add a test that demonstrates the bug?

@mtrezza mtrezza changed the title Update ParseObject.cs fix: app crashes when using ParseQuery.include with anonymous user May 25, 2024
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: app crashes when using ParseQuery.include with anonymous user fix: App crashes when using ParseQuery.include with anonymous user May 25, 2024
@mtrezza mtrezza changed the title fix: App crashes when using ParseQuery.include with anonymous user fix: SDK crashes when using ParseQuery.include with anonymous user May 25, 2024
@mtrezza mtrezza requested a review from a team May 25, 2024 23:00
@Werkezeugs Werkezeugs closed this May 27, 2024
@mtrezza
Copy link
Member

mtrezza commented May 28, 2024

@Werkezeugs why has this PR been closed?

@Werkezeugs
Copy link
Contributor Author

Hi @mtrezza ,
This was by intention😉
found a better fix for the issue, just let me open a new PR on that

@mtrezza
Copy link
Member

mtrezza commented Jun 11, 2024

Maybe consider to fix the rootcause, why is serviceHub null here? I couln´t determine yet.

Maybe that would need to be investigated?

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.

None yet

2 participants