Skip to content

ERR_CLEARTEXT_NOT_PERMITTED #7

Closed
@louisdeveseleer

Description

@louisdeveseleer

Testing the demo app on the emulator and on my Android device, I get the same error:
Webpage not available.
The webpage at http:/127.0.0.1:46085/ could not be loaded because:
net::ERR_CLEARTEXT_NOT_PERMITTED

Console output:

Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Waiting for sdk gphone x86 arm to report its views...
Debug service listening on ws://127.0.0.1:53029/vpU2zKITaHg=/ws
Syncing files to device sdk gphone x86 arm...
I/WebViewFactory(10684): Loading com.google.android.webview version 83.0.4103.101 (code 410410181)
I/hreed_view_tes(10684): The ClassLoaderContext is a special shared library.
W/Gralloc4(10684): allocator 3.x is not supported
I/hreed_view_tes(10684): The ClassLoaderContext is a special shared library.
I/cr_LibraryLoader(10684): Loaded native library version number "83.0.4103.101"
I/cr_CachingUmaRecorder(10684): Flushed 3 samples from 3 histograms.
I/TetheringManager(10684): registerTetheringEventCallback:com.example.threed_view_test
W/chromium(10684): [WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
I/flutter (10684): >>>> ModelViewer initializing... <http://127.0.0.1:46085/>
D/EGL_emulation(10684): eglCreateContext: 0xe82662d0: maj 3 min 0 rcv 3
D/EGL_emulation(10684): eglMakeCurrent: 0xe82662d0: ver 3 0 (tinfo 0xe85badb0) (first time)
W/hreed_view_tes(10684): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
D/HostConnection(10684): HostConnection::get() New Host Connection established 0xe8467010, tid 10810
V/InputMethodManager(10684): b/117267690: Failed to get fallback IMM with expected displayId=6 actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{b86f4dc VFEDHVC.. ........ 0,0-768,1024}
D/HostConnection(10684): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
W/cr_media(10684): Requires BLUETOOTH permission
I/VideoCapabilities(10684): Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil(10684): HW encoder for video/avc is not available on this device.
I/flutter (10684): >>>> ModelViewer failed to load: net::ERR_CLEARTEXT_NOT_PERMITTED (WebResourceErrorType.unknown -1)
D/EGL_emulation(10684): eglCreateContext: 0xe8266f80: maj 3 min 0 rcv 3
D/EGL_emulation(10684): eglMakeCurrent: 0xe8266f80: ver 3 0 (tinfo 0xb552af90) (first time)

Main file:

import 'package:flutter/material.dart';
import 'package:model_viewer/model_viewer.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: ModelViewer(
          src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb',
          alt: "A 3D model of an astronaut",
          ar: true,
          autoRotate: true,
          cameraControls: true,
        ),
      ),
    );
  }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions