Skip to content

Commit

Permalink
Fix EACCES: permission denied, open '/tmp/flaresolverr.txt'. Resolves #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang committed May 30, 2021
1 parent 05f8ef9 commit 5da5156
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Expand Up @@ -36,14 +36,14 @@ function validateEnvironmentVariables() {
}

async function testChromeInstallation() {
log.debug("Testing Chrome installation...")
const sessionId = UUIDv1()
// create a temporary file for testing
log.debug("Testing Chrome installation...")
const fileContent = `flaresolverr_${version}`
const filePath = path.join(os.tmpdir(), 'flaresolverr.txt')
const filePath = path.join(os.tmpdir(), `flaresolverr_${sessionId}.txt`)
const fileUrl = `file://${filePath}`
fs.writeFileSync(filePath, fileContent)
// launch the browser
const sessionId = UUIDv1()
const session = await sessions.create(sessionId, {
userAgent: null,
oneTimeSession: true
Expand Down

0 comments on commit 5da5156

Please sign in to comment.