# Error: "Process cannot access the file..."

**URL:** https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868
**Category:** Elements
**Created:** [April 23, 2020, 7:51pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868 "2020-04-23T19:51:35Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [April 23, 2020, 7:51pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/1 "2020-04-23T19:51:35Z")

</div>

This was logged [here](https://talk.remobjects.com/t/build-error-when-including-firebase-crashlytics/21649) as [bugs://84097](https://www.remobjects.com/portal/bugs/?id=84097)but I’m hitting a new element of the problem. If I delete the problematic folder (`javax\inject\javax\inject`), wait for the reference to resolve, and _then_ build, then I can avoid the error. But if I have multiple references that need the resource then I get the error regardless during the build process.

For example, if I add `firebase-analytics` and `firebase-crashlytics` as references to my project, the error occurs every time because both libraries apparently need `javax\inject`.

Here’s a sample project. It is a clean slate project with the only changes being that I added firebase-analytics and firebase-crashlytics to the project.

[com.race.zip](https://talk.remobjects.com/uploads/short-url/i915kwM2ojkNFwo1MZfjThqlgkT.zip) (30.4 KB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 23, 2020, 7:59pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/2 "2020-04-23T19:59:48Z")

</div>

> [@zmattr](#):
>
> This was logged [here](https://talk.remobjects.com/t/build-error-when-including-firebase-crashlytics/21649) as [bugs://84097](https://www.remobjects.com/portal/bugs/?id=84097)but I’m hitting a new element of the problem. If I delete the problematic folder ( `javax\inject\javax\inject` ), wait for the reference to resolve, and _then_ build, then I can avoid the error. But if I have multiple references that need the resource then I get the error regardless during the build process.

Yeah, in that case only doing a command line build will work well. I’ll out prior’s on this issue — I basically need to find a Cocoa (or C) native unzip library. One option would be our own libGo, but that adds _a lot_ of overhead… Actually, what I could do is see if I can do my own unzip “exe”, either using Go or the . NET library, and use that instead of `/bin/unzip`… I’ll have a look over the weekend.

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [April 23, 2020, 8:26pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/3 "2020-04-23T20:26:03Z")

</div>

> [@mh](#):
>
> Yeah, in that case only doing a command line build will work well

To clarify, it’s failing from command line for me as well

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 23, 2020, 9:28pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/4 "2020-04-23T21:28:13Z")

</div>

> [@zmattr](#):
>
> To clarify, it’s failing from command line for me as well

Even after you cleaned the Gradle cache folder? Coz once those borked chips are extracted with missing access rights, everything will fail.

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [April 24, 2020, 12:05pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/5 "2020-04-24T12:05:24Z")

</div>

> [@mh](#):
>
> Even after you cleaned the Gradle cache folder?

Ah, no, it looks like cleaning the gradle cache folder and then running from command line gets me a clean build. I thought I’d tried that but I guess not. Thanks

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 24, 2020, 12:31pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/6 "2020-04-24T12:31:25Z")

</div>

Think I found a native unzip library I can use, so hopefully I can fix the underlying issue for next week’s build.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 28, 2020, 2:58pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/7 "2020-04-28T14:58:56Z")

</div>

Fixed for coming Friday’s build.

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [May 15, 2020, 5:04pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/8 "2020-05-15T17:04:05Z")

</div>

I’m still having an issue here when trying to run the build in Water. It (mostly) works for me from the command line, but I noticed that if I attempt to build one project from CLI and then cd to another project and build, I have to delete the problematic `javax\inject` folder again.

Here’s a test case. This one works for me from CLI but not Water.

[test.crashlytics.zip](https://talk.remobjects.com/uploads/short-url/3F3sB9plAQaosbxZDk6rReUYLfU.zip) (31.2 KB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 15, 2020, 6:27pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/9 "2020-05-15T18:27:17Z")

</div>

> [@zmattr](#):
>
> I’m still having an issue here when trying to run the build in Water

That has to be a different issue then ,as the previous bug affected solely Fire, which used the macOS-native `unzips command tool.

> [@zmattr](#):
>
> Here’s a test case. This one works for me from CLI but not Water.

I’ll have a look; but it’ll have nothing to do with what what was fixed before… 😉

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [May 28, 2020, 3:32pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/10 "2020-05-28T15:32:10Z")

</div>

I forgot about this 🙁 still can’t get crashlytics working because of this “process cannot access the file” error

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 28, 2020, 6:16pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/11 "2020-05-28T18:16:19Z")

</div>

> [@zmattr](#):
>
> I forgot about this 🙁

Me too. will have a look today.

> [@zmattr](#):
>
> but I noticed that if I attempt to build one project from CLI and then cd to another project and build, I have to delete the problematic `javax\inject` folder again.

That’s without any Water open (or at least, any project using these open)? Curious…

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 28, 2020, 6:58pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/12 "2020-05-28T18:58:46Z")

</div>

Got it. looks like the file is declared _readonly_ on the zip file. 🤷🏼‍♀️

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [May 28, 2020, 7:00pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/13 "2020-05-28T19:00:03Z")

</div>

😂🤷‍♂️

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 28, 2020, 10:54pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/14 "2020-05-28T22:54:22Z")

</div>

New build is up, with what hope is the fix (installing myself, now, to retest)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [May 28, 2020, 11:03pm UTC](https://talk.remobjects.com/t/error-process-cannot-access-the-file/21868/15 "2020-05-28T23:03:00Z")

</div>

Yep, looks like the fix worked.
