PeterMyer / Byte-RecipeReader

Program to generate an accurate recipe ingredients, instructions, and nutrition label from a cook book recipe image
https://byte-recipe-reader.herokuapp.com/
2 stars 0 forks source link

Crop button needs to be hit twice to work properly. Generates error first try. #24

Closed PeterMyer closed 1 year ago

PeterMyer commented 2 years ago
`helperFunctions.js:7 Uncaught (in promise) DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
    at blobCreationFromURL (http://localhost:3000/static/js/bundle.js:1963:20)
    at getCropData (http://localhost:3000/static/js/bundle.js:171:94)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:44136:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:44185:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:44247:35)
    at invokeGuardedCallbackAndCatchFirstError (http://localhost:3000/static/js/bundle.js:44262:29)
    at executeDispatch (http://localhost:3000/static/js/bundle.js:49091:7)
    at processDispatchQueueItemsInOrder (http://localhost:3000/static/js/bundle.js:49123:11)
    at processDispatchQueue (http://localhost:3000/static/js/bundle.js:49136:9)
    at dispatchEventsForPlugins (http://localhost:3000/static/js/bundle.js:49147:7)`
PeterMyer commented 1 year ago

Fixed Bug.

Issue was that crop function was setting state first, which caused a delay in state being sent to db api.