Akryum / vue-cli-plugin-apollo

🚀 @vue/cli plugin for Vue Apollo

Home Page:https://vue-cli-plugin-apollo.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google gets Unable to find native implementation, or alternative implementation for WebSocket!

jkosonen opened this issue · comments

Crawling pages with google webmaster tools shows
Unable to find native implementation, or alternative implementation for WebSocket! as a console error, and page is just blank.

wsClient is created with

import { createApolloClient } from 'vue-cli-plugin-apollo/graphql-client';
const { apolloClient, wsClient } = createApolloClient({
  ...defaultOptions
});
apolloClient.wsClient = wsClient;
commented

Since Vue Apollo uses https://github.com/apollographql/subscriptions-transport-ws
If you are in an SSR environment, you need to inject a websocket implementation by yourself.

I'm not in SSR environment

Well Googlebot, does not support websockets. It's just doing an 'initial render'.
So Googlebot can't see any of the data received via the websocket.
You should just make sure the site code handles the failure gracefully. If the failure causes an uncaught exception, its possible exception will abort javascript execution, which means a partial render.

Google Webmasters Forum

@jkosonen can you try perform this check on your side? If it won't work, probably, we'll have to add a fail-safe check in the plugin itself in order to continue scripts execution.