aragon / aragon-apps

(Aragon 1) Aragon apps developed by Aragon Core Devs (smart contracts + webapps)
https://aragon.org/discover
GNU Affero General Public License v3.0
388 stars 212 forks source link

App not serving script #239

Closed jvluso closed 6 years ago

jvluso commented 6 years ago

I'm trying to run Aragon locally. When I do, the main aragon app cannot get the scripts from the other apps. The error being thrown by the main app in the browser is:

Failed to load Voting(0x9b061Cc570950952ccfD2B7df4c3B7FF94904e65)'s script (/script.js): Response { type: "cors", url: "http://localhost:3001/script.js", redirected: false, status: 500, ok: false, statusText: "Internal Server Error", headers: Headers, bodyUsed: false } index.js:2284

The error thrown by the app where it is running is:

Proxy error: Could not proxy request /script.js from localhost:3001 to http://localhost:3001. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

onbjerg commented 6 years ago

Are you trying to run the app locally pointing to Rinkeby, or trying to run it locally pointing to testrpc?

sohkai commented 6 years ago

Hey @jvluso, this sounds like a CORS / local dev server issue, which is weird.

A few questions, since there's a number of different things that could be going on:

jvluso commented 6 years ago
sohkai commented 6 years ago

Hmm, this is super super weird. Does http://localhost:3001/script.js give you anything back? Does app/public/script.js exist? Do any of the other local apps work or is it just Voting?

Otherwise, if it's working with <app>.aragonpm.com, I can only guess it's something funny with the webpack dev server that's used in our fork of react-scripts. Our fork has explicitly enabled CORS on it, so it shouldn't be a CORS issue :(.

Which OS are you running on? Most of us are using macOS, but maybe on windows or linux the dev server behaves differently / is buggy? Otherwise, you could try yarn if you haven't already, since the lock file might mitigate against any new updates in react-scripts' dependencies.

jvluso commented 6 years ago

Script.js was being called Script.js.js. Renaming it solved the problem. This was happening on linux. Thank you for helping me.

marc4gov commented 5 years ago

Seems I have a CORS issue, reaching out to IPFS when following the tutorial (Bella 0.7). The Counter App doesn't show in the left pane, but it is listed as 'Unknown' when I follow the Permissions link

Schermafbeelding 2019-05-22 om 08 11 27 Schermafbeelding 2019-05-22 om 08 11 49
onbjerg commented 5 years ago

@marc4gov Seems like it's a bug in Aragon CLI. I think you'll find better answers there