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

Flutter web deployment #2075

Closed
longfit opened this issue Dec 22, 2023 · 1 comment
Closed

Flutter web deployment #2075

longfit opened this issue Dec 22, 2023 · 1 comment

Comments

@longfit
Copy link

longfit commented Dec 22, 2023

Package

dio

Version

5.3.3

Operating-System

Web

Output of flutter doctor -v

lutter doctor -v
[✓] Flutter (Channel stable, 3.16.5, on Ubuntu 23.10 6.5.0-14-generic, locale en_US.UTF-8)
    • Flutter version 3.16.5 on channel stable at /home/ykwings/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (2 days ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/ykwings/android-sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /home/ykwings/android-sdk
    • Java binary at: /home/ykwings/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 16.0.6 (15)
    • cmake version 3.27.4
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2023.1)
    • Android Studio at /home/ykwings/android-studio
    • Flutter plugin version 77.1.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.85.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.78.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 23.10 6.5.0-14-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 120.0.6099.109

[✓] Network resources
    • All expected network resources are available.

Dart Version

3.2.3

Steps to Reproduce

my flutter web app work properly at flutter chrome with "disable-web-security"
I deploy to nginx only shown login page
,press button no repsone
chrome development tools shown error ,

Exception while loading service worker: Error: Service Worker API unavailable.
The current context is NOT secure.
Read more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
at FlutterServiceWorkerLoader.loadServiceWorker (flutter.js:130:11)
at FlutterLoader.loadEntrypoint (flutter.js:360:33)
at VM50:4:23
(anonymous) @ flutter.js:362
login:1 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
login:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

Screenshot from 2023-12-22 11-59-38

Expected Result

get nodejs api server json data
e.g longfit.f3322.org:8100/api/user/login

Actual Result

press login press no response

@longfit longfit added h: need triage This issue needs to be categorized s: bug Something isn't working labels Dec 22, 2023
@AlexV525
Copy link
Member

Please provide a minimal reproducible example.

@AlexV525 AlexV525 added the h: need more info Further information is requested label Dec 22, 2023
@AlexV525 AlexV525 added i: no useful information and removed h: need more info Further information is requested h: need triage This issue needs to be categorized s: bug Something isn't working labels Jan 16, 2024
@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants