Skip to content

Conversation

@ChristophWurst
Copy link
Member

It's not expected that an app would be unavailable when the app
container is created but when services are registered, but Sentry tells
me on Nextcloud 21 there is an edge case where this can happen.
Therefore this patch hardens the code a bit to log a meaningful error
message and skipping the next code instead of logging a php notice for
the undefined index and an exception for calling a method on null.

Ref https://sentry.io/share/issue/4d592dbccd6a4d53bd0b402d9bbad8a6/ for the index notice
Ref https://sentry.io/share/issue/e51474a30afa475e8a4146f887ec7987/ for the method call on null

Those two issues popped up when I ran occ app:enable sentry.

@ChristophWurst
Copy link
Member Author

/backport to stable21

@ChristophWurst
Copy link
Member Author

/backport to stable22

It's not expected that an app would be unavailable when the app
container is created but when services are registered, but Sentry tells
me on Nextcloud 21 there is an edge case where this can happen.
Therefore this patch hardens the code a bit to log a meaningful error
message and skipping the next code instead of logging a php notice for
the undefined index and an exception for calling a method on null.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the fix/harden-context-registration-app-missing branch from 5f4884f to 80dd0b9 Compare June 25, 2021 09:41
@juliusknorr
Copy link
Member

Failure unrelated

@juliusknorr juliusknorr merged commit 99013d4 into master Jun 25, 2021
@juliusknorr juliusknorr deleted the fix/harden-context-registration-app-missing branch June 25, 2021 16:42
@ChristophWurst ChristophWurst restored the fix/harden-context-registration-app-missing branch August 13, 2021 14:05
@ChristophWurst ChristophWurst deleted the fix/harden-context-registration-app-missing branch August 13, 2021 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants