Skip to content

launch not working with mailto: in app compiled for web #73679

@BlaineFredrickson

Description

@BlaineFredrickson

Code line: try { await launch("mailto:[email protected]"); } catch (e) {}

Expected results: expected to launch e-mail client with to: address filled in

Actual results: nothing happens; but catches error: PlatformException(NOT_A_WEB_SCHEME, To use webview or safariVC, you need to passin a web URL. This mailto:[email protected] is not a web URL., null, null)

using this import:

url_launcher: ^6.0.0-nullsafety.1
import 'package:url_launcher/url_launcher.dart';

Running/building with:

version: 1.0.0+1

analyzer:
- enable-experiment:
- non-nullable

environment:
sdk: '>=2.12.0-29.10.beta <3.0.0'

launch config:
"request": "launch",
"type": "dart",
"deviceId": "chrome",
"program": "lib/main.dart",
"args": [
"--no-sound-null-safety"
]

Details
flutter doctor -v
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19042.685], locale en-US)
    • Flutter version 1.26.0-1.0.pre at J:\Work\Flutter
    • Framework revision 63062a6443 (4 weeks ago), 2020-12-13 23:19:13 +0800
    • Engine revision 4797b06652
    • Dart version 2.12.0 (build 2.12.0-141.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\bfredrickson\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Program Files\Android\Android Studio\plugins\android\lib
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.52.1)
    • VS Code at C:\Users\bfredrickson\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.18.1

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 87.0.664.75

• No issues found!

Metadata

Metadata

Assignees

Labels

assigned for triageissue is assigned to a domain expert for further triagec: regressionIt was better in the past than it is nowfound in release: 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions