gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.03k stars 330 forks source link

QrcodeCapture decode fails in Firefox & Safari #248

Closed RomanSmolka closed 11 months ago

RomanSmolka commented 3 years ago

Describe the bug In Firefox and Safari QrcodeCapture does not work. By logging errors from the detect event handler, it looks like the issue is the unsupported OffscreenCanvas interface. This is the error message: ReferenceError: OffscreenCanvas is not defined

Still works in Chrome.

Can be reproduced on this demo page

Desktop:

Smartphone:

gruhn commented 3 years ago

Thanks! I think I fixed it in v3.0.2. Can you confirm?

RomanSmolka commented 3 years ago

Firefox works, but Safari is now throwing similar error: ReferenceError: Can't find variable: ImageBitmap

gruhn commented 3 years ago

Next try: v3.0.3. I can't reproduce the error in Safari anymore but it doesn't seem to work either.

tiagokriok commented 2 years ago

Hi @gruhn, In Safari and Chrome it's throwing this error TypeError: undefined is not an object (evaluating 't.data') when decoding. So far I've only tested it on Safari, but I'll test it in other browsers.

The try block runs to a certain point, but after a few seconds it's falling into the catch block

async onDetect(result) {
      try {
        const { content } = await result
        this.code = content
        await this.$axios
          .$post('/attendance', {
            social_id: this.social_id,
            dob: this.dob,
            code: this.code,
          })
          .then((response) => {
            this.$router.push({
              name: 'ShowAttendance',
              params: { id: response.data.attendance.id },
            })
        })
        .catch((err) => {
          this.$toast.error(err.data.message)
        })
      } catch (err) {
        console.log(err)
      }
    },

If you already have a solution, can you tell me where I can find it. If you need more details a can try to provide for you

Devices

aniketicloud commented 1 year ago
github-actions[bot] commented 11 months ago

This issue has been marked as stale. If there is no further activity it will be closed.