Invalid QR Code
See original GitHub issueHi,
Could anyone help me figuring out why the generation of the QR code is invalid?
Thank you!
I’m using the following dependencies:
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-qrcode-svg": "^6.0.6",
"react-native-svg": "^12.1.0",
And the code is based on this example:
import * as React from "react";
import { View, StyleSheet } from "react-native";
import SvgQRCode from "react-native-qrcode-svg";
// Simple usage, defaults for all but the value
function Simple() {
return (
<SvgQRCode
size={200}
color={"#2e78b7"}
value="Hello everyone! This is a test!"
/>
);
}
export default function QRGeneratorScreen() {
return (
<View style={styles.container}>
<View
style={{
width: "100%",
flexDirection: "row",
justifyContent: "space-around",
alignItems: "center",
}}
>
<Simple />
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "space-around",
paddingTop: 20,
alignItems: "center",
backgroundColor: "#ecf0f1",
},
});
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Resolving "Invalid" QR code issues - Circle Support Center
If you scan the QR code on your Circle Home Plus and get an error saying it is invalid, it's possible the QR...
Read more >12 Reasons why your QR code is not working
QR codes are not working for a variety of reasons. ... Invalid QR code or the URL where the QR code links to...
Read more >Unable to Scan QR Code? Here's How to Fix a QR Code.
If a QR code won't scan, it could be because the QR code error correction level is too low for the amount of...
Read more >Invalid QR Code: How to Avoid Silly Mistakes - Scanova
A. The most common mistakes that render a QR Code invalid · 1. Selecting an inverted color scheme · 2. Over-customization · 3....
Read more >Missing or invalid QR codes - Google Cardboard Help
If you can't find a QR code on your Cardboard viewer · On your computer, go to the viewer manufacturer's website, and then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I had the same error, I could solve it by entering the library and adding the attribute:
strokeLinecap={'square'} Line 141 index.js file
this eliminates the rounded shape
and modify the algorithm in the class
./src/tranformMatrixIntoPath.js
Line 2 add const cellSize = size / matrix.length - 0.1
Line 9 add path += 'M${cellSize * j+9} ${cellSize / 2 + cellSize * i}'
this to adjust the width and Height of the squares generated by the algorithm
@EmmanuelSkapple That did the trick for me! I found it odd how the QR Code was shaped, and your solution brought it all together. Looks normal and works now. It would be great if this was the default for the package.