Skip to content

Vue.js (v3) mixed content error #11170

@kevinadhiguna

Description

@kevinadhiguna

Bug description

Hi, I can not run my Vue.js v3 app. It said :

Mixed Content: The page at 'https://8080-kevinadhiguna-jiyu-tyali2phkgh.ws-us51.gitpod.io/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://10.0.5.2:8080/ws'. This request has been blocked; this endpoint must be available over WSS.

image

Steps to reproduce

  1. Open Gitpod workspace
  2. Open a terminal inside the workspace
  3. Install @vue/cli globally using npm : npm install -g @vue/cli
  4. Create a Vue.js app (v3.2.13) : vue create modal-project-vue3
  5. Navigate to the directory
  6. Add allowedhosts: 'all' to vue.config.js (otherwise it showed me Invalid Hosts error) :
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  ...
  // options
  devServer: {
    allowedHosts: 'all',
  },
  ...
})
  1. Run the app : yarn serve
  2. Open a preview in a new tab.
  3. It showed me nothing, so I looked at the console and saw the error.

Workspace affected

kevinadhiguna-jiyu-tyali2phkgh.ws-us51

Expected behavior

A Vue.js app display (I ran the project in localhost) :

image

Example repository

The repository is here : https://github.com/kevinadhiguna/jiyu/tree/master/modal-project-vue3

Anything else?

Any help is much appreciated.

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions