spawnUri() with "https"


I am trying to dynamically load code from files hosted in a HTTPS server.

Has anyone successfully made use of spawnUri() with https:// URIs?
I have tested and it works fine with http:// URIs.

But with https:// I keep getting:

Not a known scheme:
#0      _filePathFromUri (dart:_builtin:289)
#1      _loadDataAsync (dart:_builtin:359)'
Stack Trace:
#0      Isolate.spawnUri (dart:isolate-patch/isolate_patch.dart:256)

I wonder if I am missing something.

for eg, you can simply try this code:

import 'dart:async';
import 'dart:isolate';

ReceivePort receivePort;

main() {
  receivePort = new ReceivePort();
  Isolate.spawnUri(Uri.parse(""), null, receivePort.sendPort);

My Dart VM version is 1.6.0 on macos_x64

Parsing the uri string using Uri.parse() before passing it to spawnUri as an argument. (As pointed out by @user568109)


I assume its caused by this bug which was fixed a few days ago

Answered By – Günter Zöchbauer

Answer Checked By – Mary Flores (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *