jovotech/jovo-framework

Jovo client-web error, crypto.getRandomValues() not supported

LydiaTM opened this issue · 3 comments

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Behavior

Hello!

I have a jovo project running on port 3000 and I need to create a web client. I have followed the instructions given in the documentation (https://github.com/jovotech/jovo-framework/tree/v4/latest/clients/client-web/docs), but when I run the js with node I get the following error:

Error: crypto.getRandomValues() not supported.

I have been working on it for days and I am not able to solve the error, I don't even understand what it is due to. From what I've been investigating it's a React error.

Thank you in advance and sorry for the inconvenience. I look forward to hearing from you.

Your Environment

  • Jovo Framework version used: 4.0.0
  • Operating System: Windows 10 / Ubuntu 20.04

HI @LydiaTM,

A few questions to help us investigate the issue:

  • Which Node version are you using?
  • Which web client are you using? React, Vue?
  • If you test one of our existing web starters, do you run into that problem as well? You can find them on our example page: https://www.jovo.tech/examples

Thanks,
Jan

I answer below:

  • v16.16.0
  • React client
  • No, only when I try to create the client in a new js, using the following code:
const JovoWebClient = require('@jovotech/client-web');

const client = new JovoWebClient.Client('http://192.168.0.46:3000/webhook', {
    version: '4.0.0',
    locale: 'en',
    platform: 'web',
    device: {
        id: '<uuid>',
        capabilities: [
            'AUDIO', 'SCREEN'
        ],
    },
    input: {
        audioRecorder: { /* ... */ },
        speechRecognizer: { /* ... */ },
    },
    output: {
        speechSynthesizer: { /* ... */ },
        audioPlayer: { /* ... */ },
        reprompts: { /* ... */ },
    },
    store: {
        storageKey: 'JOVO_WEB_CLIENT_DATA',
        shouldPersistSession: true,
        sessionExpirationInSeconds: 1800,
    }

});

Thank you for the quick response

I don't know if there is any manual where the format of the json to send to the api is specified. When I try to make a POST request to the api I get the following error:

JOVO ERROR  MatchingPlatformNotFoundError

message:
No registered platform can handle the request.