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

After https is configured, the website cannot enter the page on the mobile phone. Just keep refreshing #4660

Closed
7 tasks done
rashagu opened this issue Aug 20, 2021 · 3 comments

Comments

@rashagu
Copy link

rashagu commented Aug 20, 2021

Describe the bug

After https is configured, the website cannot enter the page on the mobile phone. Just keep refreshing
配置了 https后网站在手机端无法进入页面。就只是不停的刷新

Reproduction

minimal reproduction : https://github.com/rashagu/httpsTest
Configure vite.config.js

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  server:{
    https: true,
  },
  plugins: [vue()]
})

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    Memory: 6.61 GB / 15.91 GB
  Binaries:
    Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.73)
    Internet Explorer: 11.0.19041.906

Used Package Manager

yarn

Logs

no  error log

Validations

@theoriginalstove
Copy link
Contributor

When running the command yarn dev are you passing in the host option? Ex: yarn dev --host 0.0.0.0

Also on your mobile device are specifying https://<your device's network address>:3000 when typing in the address?

I was able to recreate the issue only when I didn't specify the https:// in the network address. Both for Chrome and Firefox on a Pixel 5. Then the same for iOS (though, not the latest version or recently patches iPhone 8 Plus,)
Commands I entered in the Node.js command prompt after a new install of Nodejs 14.17.4 on Windows 10.

yarn create vite httpsTestProj
cd httpsTestProj
yarn
yarn dev --host 0.0.0.0

System Info:

  System:
    OS: Windows 10 10.0.19043
    CPU: (20) x64 Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz
    Memory: 23.87 GB / 31.92 GB
  Binaries:
    Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.78)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    @vitejs/plugin-vue: ^1.3.0 => 1.4.0
    vite: ^2.4.4 => 2.5.0

@Kashuab
Copy link

Kashuab commented Aug 23, 2021

Possible duplicate of #2337

@bluwy
Copy link
Member

bluwy commented Mar 14, 2022

Indeed looks like a duplicate of #2337

@bluwy bluwy closed this as completed Mar 14, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants