-
Notifications
You must be signed in to change notification settings - Fork 10
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
[BUG] Permissions-Policy header #20
Comments
here my code : import 'package:cloudflare_turnstile/cloudflare_turnstile.dart';
import 'package:flutter/foundation.dart';
class TurnstileService {
/// Retrives the CloudFlare Turnstile token using invisible mode.
static Future<String?> get token async {
// Initialize an instance of invisible Cloudflare Turnstile with your site key
final turnstile = CloudflareTurnstile.invisible(
siteKey: '*****************', // Replace with your actual site key
action: 'login',
options: TurnstileOptions(
size: TurnstileSize.normal,
theme: TurnstileTheme.light,
refreshExpired: TurnstileRefreshExpired.auto,
language: 'fr',
retryAutomatically: false,
),
);
try {
// Get the Turnstile token
final token = await turnstile.getToken();
return token; // Return the token upon success
} on TurnstileException catch (e) {
// Handle Turnstile failure
if (kDebugMode) {
print('Challenge failed: ${e.message}');
}
} finally {
// Ensure the Turnstile instance is properly disposed of
turnstile.dispose();
}
// Return null if the token couldn't be generated
return null;
}
}
|
The Permissions-Policy warnings can be ignored since WebView doesn’t support hid, usb, or serial. For the renderer crash I’ll also look into disabling these unnecessary Chromium logs |
Describe the bug
When running the application, several errors appear in the log. Notably, there is a warning for an unsupported mime type for HEIC images, and multiple console errors related to unrecognized features in the Permissions-Policy header, along with subsequent errors from Cloudflare challenge scripts. Additionally, a renderer process crash is detected.
To Reproduce
Steps to reproduce the behavior:
W/VideoCapabilities(20447): Unsupported mime image/vnd.android.heic
I/chromium
console errors related to unrecognized features:'hid'
,'payment'
,'serial'
,'usb'
.Expected behavior
The application should not log warnings or errors for unsupported MIME types or unrecognized header features unless they directly affect functionality. The renderer process should remain stable without crashing.
Screenshots
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: