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

Do not steal focus to report a guru meditation #10135

Open
6 tasks done
rpdelaney opened this issue Jun 1, 2023 · 17 comments · May be fixed by #11789
Open
6 tasks done

Do not steal focus to report a guru meditation #10135

rpdelaney opened this issue Jun 1, 2023 · 17 comments · May be fixed by #11789
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface help wanted Help is wanted in fixing this issue

Comments

@rpdelaney
Copy link

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.25.1

Steps to reproduce the bug

I'm not sure unfortunately. I was watching videos last night and today I have the problem described below with the background process. I'm happy to experiment if anyone can make suggestions.

Expected behavior

When an unhandled exception occurs, NewPipe should print a guru meditation without stealing focus or switching me out of the app I'm working on.

Actual behavior

Today I'm driving my car navigating with a maps app. NewPipe repeatedly takes over the screen every few minutes to print a guru meditation. I had to pull off the road and force kill the app to get it to stop. This is dangerous and annoying.

To be clear, it's not important what the error was about. Errors happen. When they happen, NewPipe should not ever steal focus.

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

grapheneOS.org

Affected device model

Pixel 6

Additional information

No response

@rpdelaney rpdelaney added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Jun 1, 2023
@1537hasnain

This comment was marked as spam.

@SameenAhnaf
Copy link
Collaborator

SameenAhnaf commented Jun 1, 2023

Just in case, guru meditation error occurs you are supposed to scroll down a little, click on
COPY FORMATTED REPORT button and paste it in the logs section of this GitHub issue. However, the steps how to reproduce the bug are required to be identified. Could you give us more information on how the error occurred while using the app?

@SameenAhnaf SameenAhnaf added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Jun 1, 2023
@rpdelaney
Copy link
Author

rpdelaney commented Jun 1, 2023

I was driving and not using NewPipe at all. Since I needed to get to my destination on time I did not bother to copy the error log. No matter what the content of the stack trace might be, NewPipe should not ever steal focus like this.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Jun 1, 2023
@opusforlife2 opusforlife2 added GUI Issue is related to the graphical user interface and removed needs triage Issue is not yet ready for PR authors to take up labels Jun 2, 2023
@opusforlife2
Copy link
Collaborator

Basically, if the app is not in the foreground, it should simply generate an error notification, instead of a full-screen one. I think that's the most straightforward solution, @Stypox?

@rpdelaney
Copy link
Author

A notification could be reasonable to cover the use case where someone needs to know that NewPipe is no longer running in the background. Ideally, DND mode would suppress that notification as well: in my case, I did not care at all what was going on with NewPipe at that time, which made the focus-stealing especially heavy-handed and frustrating.

@mitchellcairns
Copy link

It's not clear how this is replicated. The error will display when NewPipe is completely closed and hasn't been operating. First, fix the issue of the app stealing focus to display errors, second we can go through and determine what the issues actually are.

@Stypox
Copy link
Member

Stypox commented Jun 9, 2023

I think that's the most straightforward solution, @Stypox?

Yes, although I am not sure there is a simple way to distinguish whether the app was in foreground or not AFTER it has crashed.

@opusforlife2
Copy link
Collaborator

Is that place the point of intervention? I was thinking that the moment the app goes into the background (which I think you can query programmatically?), you could tell the app to send all potential full screen error reports as error notifications instead.

@rpdelaney

This comment was marked as duplicate.

@GameOverFlowChart
Copy link

I know a way to reproduce this problem.

Step 1:
Have NewPipe in background without playing any video (not just paused)

Step 3:
Press the play button on the Bluetooth headphones (by accident or not)

Step 4:
Wait a while, it really takes some time

Step 5:
NewPipe will crash and steal the focus from which ever app was open to show guru meditation

@Wazhai
Copy link

Wazhai commented Aug 26, 2023

The core of the issue is NewPipe popping up with a full screen crash report while the app isn't in the foreground. For me this usually happens hours or even days after I last opened the app, and often repeatedly until I go and kill NewPipe manually. Most users won't care enough or have the skills to report it properly, making the unprompted focus-stealing pop-up solely a major nuisance.

@atomizer
Copy link

atomizer commented Sep 6, 2023

Step 3: Press the play button on the Bluetooth headphones (by accident or not)

Another annoying thing (though less annoying than the crash jumpscare) is that the button press gets stolen even if there was an eligible background media app that was used more recently. You have to open that app and resume playback manually.

@opusforlife2
Copy link
Collaborator

That's new. Some versions ago this used to be a workaround for another bug where headphones or Bluetooth would cause the last media app to resume, and if that happened to be Newpipe it would show an empty notification. Making sure another media app was the last one opened was the way to bypass the bug.

@amokfa
Copy link

amokfa commented Oct 9, 2023

I have created a temporary fork that has guru code commented out. Branches off of dev branch. Download the apk from releases page. https://github.com/amokfa/NewPipe/releases/tag/v1.0.0

@Coehill
Copy link

Coehill commented Dec 15, 2023

I'm experiencing this same issue on Android 14 (happened on Android 13 too) and have been for many months now. I'll try to remember to attach a log to this ticket next time. I find it difficult since it's usually when I'm driving. I wonder if it has to do with Google Maps or Waze since it never happens with OSM or OrganicMaps for me...

@rpdelaney
Copy link
Author

I use OSMAND and it happens frequently. This repro seems to be accurate.

@opusforlife2
Copy link
Collaborator

I'll try to remember to attach a log to this ticket next time.

What log are you talking about? adb logcat? Otherwise it doesn't matter what specific crash report Newpipe generates. The idea is to redirect them all to an error notification.

@AudricV AudricV added the help wanted Help is wanted in fixing this issue label May 23, 2024
@Thompson3142 Thompson3142 linked a pull request Dec 12, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface help wanted Help is wanted in fixing this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.