Azure / Azure/azure-functions-java-worker

java function runtime discrepancy causing random exception around filepath parsing

Open
#331 6 comments 0 reactions 1 assignee Claimed by @amamounelsayed View on GitHub
area:java-functions needs-investigation triaged
Dominant language
Java
Stars
103
Forks
74
Avg merge
4d 8h
Merged PRs (30d)
2

Description

#### az functions version 2

#### java

#### Question

so my azure function will sometimes run without issue, usually as long as it stays up and running it will continue to work on each invocation, then if idle and restarts on next invocation, the 'filepath cannot be resolved' issue often reappears. this is the standard backslash \ forward slash / issue between different runtimes, i.e. windows vs linux. but i can run this function locally, with the / as the file separator, and it runs everytime both on linux and windows env's. but there is something about the azure function java runtime that cannot parse the filepath correctly sometimes. I notice it does convert the / to a \ in the filepath but then cannot resolve it.

e.g. this morning on first invocation of the function, it failed with the issue. I restarted the function, now its working.

if i change the app settings in the azure console to run on 64 bit system, it works (without an explicit restart), then if i change it back to 32bit it still works.

there must be some other setting or runtime parameter that differs that results in inability to parse filepath.

I also tried using the File.Separator instead of the / in the function, but it just parses it the same and replaces it with the \ at runtime and still can throw the exception

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.