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

ERR_ACCESS_DENIED #147

Closed
jennifer-elyse opened this issue Apr 26, 2021 · 1 comment
Closed

ERR_ACCESS_DENIED #147

jennifer-elyse opened this issue Apr 26, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@jennifer-elyse
Copy link

Issue Description

Getting Error loading page
Domain: undefined
Error Code: -1
Description: net::ERR_ACCESS_DENIED

Steps to Reproduce / Code Snippets

const navigation = useNavigation();
const [newPdfUri, setNewPdfUri] = useState(null);
const [renderedOnce, setRenderedOnce] = useState(false);
     useEffect(() => {
	const createPdf = async (html) => {
		try {
			const { uri } = await Print.printToFileAsync({ html, base64: true });
			setNewPdfUri(uri);
			console.log('new pdf uri: ' + uri);
			setRenderedOnce(true);
			return uri;
		} catch (err) {
			console.error(err);
		}
	};
	const html = `<div style="display: flex; width: 100%; justify-content: space-between; margin-top: 25px">
		<div style="display: flex; justify-content: space-between; align-items: center">
			<div>
			${delivery?.driverSignature && delivery?.driverSignatureNotAvailable === 'N'
				? `<img src="${delivery?.driverSignature}" height="150px" width="300px" />
				 <br />${delivery?.driverName}`
				: delivery?.driverSignatureNotAvailable === 'Y' ? '<br /><br /><br />Driver Signature Not Available' : '<br />'
			 }
			 </div>
		</div>
	</div>`;

	createPdf(html);
}, []);

return (
	<View style={styles.container}>
		{renderedOnce && newPdfUri &&
			<PDFReader
				source={renderedOnce && newPdfUri ? { uri: newPdfUri } : undefined}
			/>
		}
	</View>
)

Expected Results

A Viewable PDF

Additional Information

  • Nodejs version: v12.18.3
  • React version: 16.13.1
  • React Native version: 0.63.4
  • rn-pdf-reader-js version: 4.1.1
  • Platform(s) (iOS, Android, or both?): Only using Android
  • TypeScript version: N/A
@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 3, 2021
@stale stale bot closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant