Closed yarikoptic closed 3 years ago
wise @margulies pointed out that local dev instance goes over http and not https -- might relate? (but then -- all other features work just fine AFAIK)
and tried again to click on :+1: and console has
service.ts:160 POST http://localhost:5001/sparkle-ohbm/us-central1/venue-voteInPoll net::ERR_CONNECTION_REFUSED
@yarikoptic @margulies Off the top of my head, this looks like you're not running the firebase function emulators during local dev, which is failing as I believe this feature calls a backend function.
See the documentation about this in the README:
tl;dr: npm run firebase:emulate-functions
I have tried to submit a new poll from the local instance but got
chat.ts:138 Uncaught (in promise) Error: internal
@yarikoptic Usually when you get 'Error: internal' it relates to a firebase backend function, as that is the default response it returns for unhandled errors. If it's a real backend error, then you would usually be able to find the details about it in the corresponding function's logs in the firebase admin console.
local environment issue...
Yeah, must have been no emulators etc
I was trying to add markdown rendering for Poll to go in #1383 (attn @margulies ,
yet topushed to that PR), for that I had added a poll on the main OHBM page (on https://ohbm.sparkle.space/in/home logged in as Y.Halchenko) and then went to local instance on http://localhost:3000/in/home where I am logged in as Yarik, but when I tried to click on :+1: button (rendered nicely with markdown BTW) I am thrown into debugger, I switched back tostaging
where the poll looks likeand tried again to click on
:+1:
and console hasthe stack
```shell (anonymous) @ service.ts:160 step @ tslib.es6.js:100 (anonymous) @ tslib.es6.js:81 (anonymous) @ tslib.es6.js:74 __awaiter @ tslib.es6.js:70 Service.postJSON @ service.ts:151 (anonymous) @ service.ts:216 step @ tslib.es6.js:100 (anonymous) @ tslib.es6.js:81 fulfilled @ tslib.es6.js:71 Promise.then (async) step @ tslib.es6.js:73 (anonymous) @ tslib.es6.js:74 __awaiter @ tslib.es6.js:70 Service.call @ service.ts:192 (anonymous) @ service.ts:140 voteInVenuePoll @ chat.ts:137 (anonymous) @ useVenuePoll.ts:25 (anonymous) @ ChatPoll.tsx:66 onClick @ ChatPoll.tsx:81 callCallback @ react-dom.development.js:188 invokeGuardedCallbackDev @ react-dom.development.js:237 invokeGuardedCallback @ react-dom.development.js:292 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:306 executeDispatch @ react-dom.development.js:389 executeDispatchesInOrder @ react-dom.development.js:414 executeDispatchesAndRelease @ react-dom.development.js:3278 executeDispatchesAndReleaseTopLevel @ react-dom.development.js:3287 forEachAccumulated @ react-dom.development.js:3259 runEventsInBatch @ react-dom.development.js:3304 runExtractedPluginEventsInBatch @ react-dom.development.js:3514 handleTopLevel @ react-dom.development.js:3558 batchedEventUpdates$1 @ react-dom.development.js:21871 batchedEventUpdates @ react-dom.development.js:795 dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3568 attemptToDispatchEvent @ react-dom.development.js:4267 dispatchEvent @ react-dom.development.js:4189 unstable_runWithPriority @ scheduler.development.js:653 runWithPriority$1 @ react-dom.development.js:11039 discreteUpdates$1 @ react-dom.development.js:21887 discreteUpdates @ react-dom.development.js:806 dispatchDiscreteEvent @ react-dom.development.js:4168 ```so smells like system considers me not logged in or smth like that... so I logged out, logged in, saw
in the console, clicked on
:+1:
and got the same error as before.I have tried to submit a new poll from the local instance but got
so again suggesting that something is funky about login for the purpose of the Poll from a local dev instance?
edit: FWIW -- I did try poll yesterday and it worked - but I don't remember in which instance I had submitted and in which voted... and then I removed that poll to "not clutter" (should have kept)