Anvil Runtime Engine: This app may be misconfigured. The following error occurred: App dependency not found

Hello,

I decided to load up the open-source Anvil Runtime on a web server and cloned my app to it. After running the app and accessing the server via my browser, I encounter a problem:

**The app you requested could not be loaded.**

This app may be misconfigured. The following error occurred:

`App dependency not found`

My server console output also shows:

[WARN  anvil.runtime.app-data] Cannot depend on dependency before other checks MyApp **redacted** {:branch "published", :fallback-branch "master"}: 
[WARN  anvil.runtime.app-data] Cannot depend on dependency before other checks MyApp **redacted** {:branch "published", :fallback-branch "master"}: 
[WARN  anvil.runtime.app-data] Cannot depend on dependency before other checks MyApp C6ZZPAPN4YYF5NVJ {:branch "published", :fallback-branch "master"}: 
[WARN  anvil.runtime.app-data] Cannot depend on dependency before other checks MyApp **redacted** {:branch "published", :fallback-branch "master"}: 
[WARN  anvil.runtime.app-data] Cannot depend on dependency before other checks MyApp **redacted** {:branch "published", :fallback-branch "master"}:

My app does in fact have 5 dependencies, and one of the ones that shows up in the console (C6ZZPAPN4YYF5NVJ) is recognizable to me as anvil-extras.

Does this mean that in order to run the app on my server, I also need to clone each of the dependencies locally into separate directories as well?

EDIT: After reviewing a similar topic and checking the documentation I see I can download my dependencies and specify them with a flag when running the anvil app server. However some of my dependencies aren’t cloned into my account, rather I just reference them in the Anvil IDE for my app (like anvil-extras). What do I do about those?

Yeah, unfortunately as far as I can tell when I did the same thing recently, you will have to clone anvil extras to your machine and set the flag. the same for all other 3rd party packages.

Also, don’t forget to link to nested dependencies:

@duncan_richards12 is right! If you think about it, there’s no other way we could implement this: if you’re using our hosted service, dependencies are other apps also on our hosted service, so we can automatically pull together all the source code you need when we’re serving your app.

The App Server is a truly standalone program - it doesn’t have any hidden ā€œphone homeā€ machinery for downloading and running code from us (if it did, that would be cool but not particularly independent from our service, which would erase a lot of the benefits). So all the source code your app is going to use needs to be downloaded onto the machine where it’s running!

4 Likes

There are some examples of exactly how to do this here (with videos):

In the text file, look for the section ā€˜download the third party app code’

1 Like

Nice, thanks!

What about doing a database dump from an app hosted with Anvil to another server running the runtime? We don’t have CLI access to apps hosted on Anvil.

This probably belongs as a new question. But before you do that, search the Forum for SQLite. It’s often used as a backup/restore format, so it might be the intermediate file you’re looking for.

2 Likes

This is some code that may be useful to dump to json:

I’ve found json to be less troublesome than CSV in several cases.

1 Like