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

Added INTERNET permissions to the manifest #1

Merged
merged 1 commit into from Jan 21, 2022

Conversation

svillar
Copy link
Member

@svillar svillar commented Jan 21, 2022

Wolvic should declare that it needs internet permissions

Copy link
Contributor

@MortimerGoro MortimerGoro left a comment

Choose a reason for hiding this comment

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

This permission is already added via some dependencies (e.g geckoview), you can see it in the merged manifest. Anyway, it's a good idea to have it here too as it's more declarative and it avoids problem if we change dependencies in the future that don't include it.

@MortimerGoro MortimerGoro merged commit 60c37b8 into main Jan 21, 2022
@svillar
Copy link
Member Author

svillar commented Jan 21, 2022

This permission is already added via some dependencies (e.g geckoview), you can see it in the merged manifest. Anyway, it's a good idea to have it here too as it's more declarative and it avoids problem if we change dependencies in the future that don't include it.

Right, I guess the main issue was not functional but aesthetic. The app was not showing the internet requirement in the app store. That is not a big deal anyway, as even popular apps like Beat Saber do not advertise the internet requirement either.

@svillar svillar deleted the internet-permission branch March 29, 2022 08:41
svillar added a commit that referenced this pull request Sep 8, 2022
Currently the CrashReporter service uses the runtime to create a
CrashReportIntent. The reason why it does that is because the CrashReportIntent
receives some parameters that depend on the backend (Gecko,Chromium) which
cannot be resolved at build time.

By the time the CrashReporter creates that intent the runtime might not exist
(like after a crash in the application). This means that the service will try
to create it. The problem is that creating the runtime might not be possible,
for example the GeckoRuntime must be created in the main thread but the crash
reporter service is run in an async task as it can be see in this backtrace:

2022-09-08 14:15:38.005 20233-20267/com.igalia.wolvic.dev E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.igalia.wolvic.dev:crash, PID: 20233
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.IllegalThreadStateException: Expected thread 2 ("main"), but running on thread 930 ("AsyncTask #1")
        at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison(ThreadUtils.java:127)
        at org.mozilla.gecko.util.ThreadUtils.assertOnThread(ThreadUtils.java:93)
        at org.mozilla.gecko.util.ThreadUtils.assertOnUiThread(ThreadUtils.java:84)
        at org.mozilla.geckoview.GeckoRuntime.create(GeckoRuntime.java:552)
        at com.igalia.wolvic.browser.api.impl.RuntimeImpl.<init>(RuntimeImpl.java:72)
        at com.igalia.wolvic.browser.api.WFactory.createRuntime(WFactory.java:14)
        at com.igalia.wolvic.browser.engine.EngineProvider.getOrCreateRuntime(EngineProvider.kt:67)
        at com.igalia.wolvic.crashreporting.CrashReporterService.onHandleWork(CrashReporterService.java:65)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:392)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:383)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:919) 

This is why we have to add an extra class per backend that is able to create
those intents without having to instantiate the runtime.
HollowMan6 pushed a commit that referenced this pull request Oct 1, 2023
Currently the CrashReporter service uses the runtime to create a
CrashReportIntent. The reason why it does that is because the CrashReportIntent
receives some parameters that depend on the backend (Gecko,Chromium) which
cannot be resolved at build time.

By the time the CrashReporter creates that intent the runtime might not exist
(like after a crash in the application). This means that the service will try
to create it. The problem is that creating the runtime might not be possible,
for example the GeckoRuntime must be created in the main thread but the crash
reporter service is run in an async task as it can be see in this backtrace:

2022-09-08 14:15:38.005 20233-20267/com.igalia.wolvic.dev E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.igalia.wolvic.dev:crash, PID: 20233
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.IllegalThreadStateException: Expected thread 2 ("main"), but running on thread 930 ("AsyncTask #1")
        at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison(ThreadUtils.java:127)
        at org.mozilla.gecko.util.ThreadUtils.assertOnThread(ThreadUtils.java:93)
        at org.mozilla.gecko.util.ThreadUtils.assertOnUiThread(ThreadUtils.java:84)
        at org.mozilla.geckoview.GeckoRuntime.create(GeckoRuntime.java:552)
        at com.igalia.wolvic.browser.api.impl.RuntimeImpl.<init>(RuntimeImpl.java:72)
        at com.igalia.wolvic.browser.api.WFactory.createRuntime(WFactory.java:14)
        at com.igalia.wolvic.browser.engine.EngineProvider.getOrCreateRuntime(EngineProvider.kt:67)
        at com.igalia.wolvic.crashreporting.CrashReporterService.onHandleWork(CrashReporterService.java:65)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:392)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:383)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:919) 

This is why we have to add an extra class per backend that is able to create
those intents without having to instantiate the runtime.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
HollowMan6 pushed a commit that referenced this pull request Jan 24, 2024
Currently the CrashReporter service uses the runtime to create a
CrashReportIntent. The reason why it does that is because the CrashReportIntent
receives some parameters that depend on the backend (Gecko,Chromium) which
cannot be resolved at build time.

By the time the CrashReporter creates that intent the runtime might not exist
(like after a crash in the application). This means that the service will try
to create it. The problem is that creating the runtime might not be possible,
for example the GeckoRuntime must be created in the main thread but the crash
reporter service is run in an async task as it can be see in this backtrace:

2022-09-08 14:15:38.005 20233-20267/com.igalia.wolvic.dev E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.igalia.wolvic.dev:crash, PID: 20233
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.IllegalThreadStateException: Expected thread 2 ("main"), but running on thread 930 ("AsyncTask #1")
        at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison(ThreadUtils.java:127)
        at org.mozilla.gecko.util.ThreadUtils.assertOnThread(ThreadUtils.java:93)
        at org.mozilla.gecko.util.ThreadUtils.assertOnUiThread(ThreadUtils.java:84)
        at org.mozilla.geckoview.GeckoRuntime.create(GeckoRuntime.java:552)
        at com.igalia.wolvic.browser.api.impl.RuntimeImpl.<init>(RuntimeImpl.java:72)
        at com.igalia.wolvic.browser.api.WFactory.createRuntime(WFactory.java:14)
        at com.igalia.wolvic.browser.engine.EngineProvider.getOrCreateRuntime(EngineProvider.kt:67)
        at com.igalia.wolvic.crashreporting.CrashReporterService.onHandleWork(CrashReporterService.java:65)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:392)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:383)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:919) 

This is why we have to add an extra class per backend that is able to create
those intents without having to instantiate the runtime.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
HollowMan6 pushed a commit that referenced this pull request Jan 25, 2024
Currently the CrashReporter service uses the runtime to create a
CrashReportIntent. The reason why it does that is because the CrashReportIntent
receives some parameters that depend on the backend (Gecko,Chromium) which
cannot be resolved at build time.

By the time the CrashReporter creates that intent the runtime might not exist
(like after a crash in the application). This means that the service will try
to create it. The problem is that creating the runtime might not be possible,
for example the GeckoRuntime must be created in the main thread but the crash
reporter service is run in an async task as it can be see in this backtrace:

2022-09-08 14:15:38.005 20233-20267/com.igalia.wolvic.dev E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.igalia.wolvic.dev:crash, PID: 20233
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.IllegalThreadStateException: Expected thread 2 ("main"), but running on thread 930 ("AsyncTask #1")
        at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison(ThreadUtils.java:127)
        at org.mozilla.gecko.util.ThreadUtils.assertOnThread(ThreadUtils.java:93)
        at org.mozilla.gecko.util.ThreadUtils.assertOnUiThread(ThreadUtils.java:84)
        at org.mozilla.geckoview.GeckoRuntime.create(GeckoRuntime.java:552)
        at com.igalia.wolvic.browser.api.impl.RuntimeImpl.<init>(RuntimeImpl.java:72)
        at com.igalia.wolvic.browser.api.WFactory.createRuntime(WFactory.java:14)
        at com.igalia.wolvic.browser.engine.EngineProvider.getOrCreateRuntime(EngineProvider.kt:67)
        at com.igalia.wolvic.crashreporting.CrashReporterService.onHandleWork(CrashReporterService.java:65)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:392)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:383)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:919) 

This is why we have to add an extra class per backend that is able to create
those intents without having to instantiate the runtime.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
HollowMan6 pushed a commit that referenced this pull request Mar 22, 2024
Currently the CrashReporter service uses the runtime to create a
CrashReportIntent. The reason why it does that is because the CrashReportIntent
receives some parameters that depend on the backend (Gecko,Chromium) which
cannot be resolved at build time.

By the time the CrashReporter creates that intent the runtime might not exist
(like after a crash in the application). This means that the service will try
to create it. The problem is that creating the runtime might not be possible,
for example the GeckoRuntime must be created in the main thread but the crash
reporter service is run in an async task as it can be see in this backtrace:

2022-09-08 14:15:38.005 20233-20267/com.igalia.wolvic.dev E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.igalia.wolvic.dev:crash, PID: 20233
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.IllegalThreadStateException: Expected thread 2 ("main"), but running on thread 930 ("AsyncTask #1")
        at org.mozilla.gecko.util.ThreadUtils.assertOnThreadComparison(ThreadUtils.java:127)
        at org.mozilla.gecko.util.ThreadUtils.assertOnThread(ThreadUtils.java:93)
        at org.mozilla.gecko.util.ThreadUtils.assertOnUiThread(ThreadUtils.java:84)
        at org.mozilla.geckoview.GeckoRuntime.create(GeckoRuntime.java:552)
        at com.igalia.wolvic.browser.api.impl.RuntimeImpl.<init>(RuntimeImpl.java:72)
        at com.igalia.wolvic.browser.api.WFactory.createRuntime(WFactory.java:14)
        at com.igalia.wolvic.browser.engine.EngineProvider.getOrCreateRuntime(EngineProvider.kt:67)
        at com.igalia.wolvic.crashreporting.CrashReporterService.onHandleWork(CrashReporterService.java:65)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:392)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:383)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:919) 

This is why we have to add an extra class per backend that is able to create
those intents without having to instantiate the runtime.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
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