Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors setting up local development #25

Closed
samajammin opened this issue Oct 21, 2019 · 3 comments
Closed

Errors setting up local development #25

samajammin opened this issue Oct 21, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@samajammin
Copy link
Collaborator

Environment/Browser

Latest master on MacOS

Description

This API request fails when I try to create a new project in my local development:
http://localhost:4002/v1/projects/5d9453375634771a056d25d5
See console error below. I suspect I'm missing the API service, there's nothing running on that port.

Perhaps the README instructions are outdated? I see there's a Dockerfile. I tried building & running that up but also hit issues.

Steps to reproduce

  1. Fork & cd into repo https://github.com/SuperblocksHQ/ethereum-studio/
  2. Follow quick start instructions (npx lerna bootstrap --hoist & npm start)
  3. In browser (localhost:4000), click on "create project"

Expected result

Create a project

Actual result

Nothing, console error:

GET http://localhost:4002/v1/projects/5d9453375634771a056d25d5 net::ERR_CONNECTION_REFUSED
fetchJSON @ fetchJson.ts:49
getProjectById @ project.service.ts:39
eval @ createProjectFromTemplate.epic.ts:30
SwitchMapSubscriber._next @ switchMap.js:56
Subscriber.next @ Subscriber.js:68
WithLatestFromSubscriber._next @ withLatestFrom.js:88
Subscriber.next @ Subscriber.js:68
FilterSubscriber._next @ filter.js:50
Subscriber.next @ Subscriber.js:68
Notification.observe @ Notification.js:27
ObserveOnSubscriber.dispatch @ observeOn.js:56
AsyncAction._execute @ AsyncAction.js:84
QueueAction.execute @ QueueAction.js:34
AsyncScheduler.flush @ AsyncScheduler.js:53
QueueAction.schedule @ QueueAction.js:29
Scheduler.schedule @ Scheduler.js:18
AsyncScheduler.schedule @ AsyncScheduler.js:37
ObserveOnSubscriber.scheduleMessage @ observeOn.js:62
ObserveOnSubscriber._next @ observeOn.js:66
Subscriber.next @ Subscriber.js:68
Subject.next @ Subject.js:64
AnonymousSubject.next @ Subject.js:166
eval @ createEpicMiddleware.js:54
eval @ index.js:11
createProjectFromTemplate @ index.ts:32
ProjectTemplateModal._this.onCreateProjectHandle @ ProjectTemplateModal.tsx:55
callCallback @ react-dom.development.js:363
invokeGuardedCallbackDev @ react-dom.development.js:412
invokeGuardedCallback @ react-dom.development.js:465
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:480
executeDispatch @ react-dom.development.js:613
executeDispatchesInOrder @ react-dom.development.js:638
executeDispatchesAndRelease @ react-dom.development.js:743
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:752
forEachAccumulated @ react-dom.development.js:724
runEventsInBatch @ react-dom.development.js:769
runExtractedPluginEventsInBatch @ react-dom.development.js:915
handleTopLevel @ react-dom.development.js:5887
batchedEventUpdates$1 @ react-dom.development.js:24340
batchedEventUpdates @ react-dom.development.js:1460
dispatchEventForPluginEventSystem @ react-dom.development.js:5987
attemptToDispatchEvent @ react-dom.development.js:6104
dispatchEvent @ react-dom.development.js:6007
unstable_runWithPriority @ scheduler.development.js:820
runWithPriority$2 @ react-dom.development.js:12280
discreteUpdates$1 @ react-dom.development.js:24357
discreteUpdates @ react-dom.development.js:1485
dispatchDiscreteEvent @ react-dom.development.js:5970
Show 18 more frames
createProjectFromTemplate.epic.ts:45 There was an issue loading the project: TypeError: Failed to fetch

Reproducible

100% in my local env

@filippsen
Copy link
Contributor

Hi Sam!

For the moment, it's been mentioned internally the templates are available and accessible from the production database, which means one would need to set REACT_APP_API_BASE_URL to https://studio-api.ethereum.org instead of localhost in the packages/editor/.env.development.local file when running locally.

@samajammin
Copy link
Collaborator Author

@filippsen thanks! That fixed my issue. Perhaps worth updating the README? Otherwise if this is a temporary fix, I'd say let's leave this issue open so other folks can find this solution.

@filippsen filippsen added the bug Something isn't working label Oct 29, 2019
@javier-tarazaga
Copy link
Contributor

@samajammin this PR #155 should fix the local setup for now as will point to the staging server for the local setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants