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

Cannot read property 'arrayBuffer' of undefined ( Electron.js + Vue.js) #465

Closed
marcoippolito opened this issue Jul 15, 2020 · 3 comments
Closed

Comments

@marcoippolito
Copy link

With this simple vue file taken from: https://raw.githubusercontent.com/jeromewu/tesseract.js-electron/master/index.html :

<template>
  <div>
  </div>
</template>

<script>

// https://github.com/jeromewu/tesseract.js-electron/blob/master/index.html

import { createWorker } from 'tesseract.js';
import path from 'path';

let __dirname = "";

export default {
  mounted () {
      const worker = createWorker({
        cachePath: path.join(__dirname, "lang-data"),
        logger: m => console.log(m),
      });

      (async () => {
        // await worker.load();
        await worker.loadLanguage('eng');
        //await worker.initialize('eng');
        //const { data: { text } } = await worker.recognize(path.join(__dirname, 'images', 'testocr.png'));
        //console.log(text);
        //await worker.terminate();
      })();
  }
}

</script>

I get this error:
"Uncaught Error: TypeError: Cannot read property 'arrayBuffer' of undefined createWorker.js:173 at Worker.worker.onMessage"
image

How to solve the problem?

Marco

@ColorfulHorse
Copy link

version 2.0.0 is ok

@marcoippolito
Copy link
Author

@ColorfulHorse Thank you! Yes. With version 2.0.0. is ok.
So it means that the vuersion 2.0.1 has a bug

@jeromewu
Copy link
Member

Please check v2.1.4 for the fix of this issue. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants