Pauan / SaltyBetBot

Bot which automatically bets on saltybet.com
39 stars 12 forks source link

Bot not working after loading into Chrome using "Load unpacked" #15

Closed goldieboy85 closed 4 years ago

goldieboy85 commented 4 years ago

Bot not working after loading into Chrome using "Load unpacked" and following instructions, was working a couple weeks ago. Using brand new git clone install via GitBash.

The following error is produced: Uncaught (in promise) AbortError: The connection was closed. background.html background.html:0 (anonymous function)

goldieboy85 commented 4 years ago

new error:

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist. js/saltybet.js:1 (anonymous function) let n;const e=new Array(32);function t(n){return e[n]}e.fill(void 0),e.push(void 0,null,!0,!1);let =e.length;function r(n){const r=t(n);return function(n){n<36||(e[n]=,=n)}(n),r}let c=0,o=null;function i(){return null!==o&&o.buffer===n.memory.buffer||(o=new Uint8Array(n.memory.buffer)),o}let a=new TextEncoder("utf-8");const u="function"==typeof a.encodeInto?function(n,e){return a.encodeInto(n,e)}:function(n,e){const t=a.encode(n);return e.set(t),{read:n.length,written:t.length}};function l(n,e,t){if(void 0===t){const t=a.encode(n),=e(t.length);return i().subarray(,+t.length).set(t),c=t.length,}let =n.length,r=e();const o=i();let l=0;for(;l<;l++){const e=n.charCodeAt(l);if(e>127)break;o[r+l]=e}if(l!==){0!==l&&(n=n.slice(l)),r=t(r,,=l+3*n.length);const e=i().subarray(r+l,r+);l+=u(n,e).written}return c=l,r}function b(n){return null==n}let w=null;function g(){return null!==w&&w.buffer===n.memory.buffer||(w=new Int32Array(n.memory.buffer)),w}let f=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});function d(n,e){return f.decode(i().subarray(n,n+e))}function s(n){===e.length&&e.push(e.length+1);const t=;return =e[t],e[t]=n,t}f.decode();let m=32;function y(t,,r){try{n.wasm_bindgenconvertclosuresinvoke1_mut_refh8dbf6d8b299f84ca(t,_,function(n){if(1==m)throw new Error("out of js stack");return e[--m]=n,m}(r))}finally{e[m++]=void 0}}function h(n,e){return 0===n?t(e):d(n,e)}function v(e){n.wbindgen_exnstore(s(e))}function p(n,e){return i().subarray(n/1,n/1+e)}(function e(){let o;void 0===&&(=import.meta.url.replace(/.js$/,"_bg.wasm"));const i={wbg:{}};if(i.wbg.wbindgen_object_drop_ref=function(n){r(n)},i.wbg.wbindgen_cb_drop=function(n){const e=r(n).original;if(1==e.cnt--)return e.a=0,!0;return!1},i.wbg.wbg_sendmessageraw06db037e50adb455=function(n,e){var t,=h(n,e);return s((t=_,new Promise((function(n,e){chrome.runtime.sendMessage(null,t,null,(function(t){null!=chrome.runtime.lastError?e(new Error(chrome.runtime.lastError.message)):n(t)}))}))))},i.wbg.wbindgen_stringget=function(e,){const r=t(_);var o="string"==typeof r?r:void 0,i=b(o)?0:l(o,n.wbindgen_malloc,n.wbindgen_realloc),a=c;g()[e/4+1]=a,g()[e/4+0]=i},i.wbg.wbg_new_b43fc449db38d3bd=function(n,e){var t=h(n,e);return s(new Error(t))},i.wbg.wbg_new0_926efe275b9bd771=function(){return s(new Date)},i.wbg.wbg_toUTCString_c6c53dddfae1eb43=function(n){return s(t(n).toUTCString())},i.wbg.wbindgen_string_new=function(n,e){return s(d(n,e))},i.wbg.widl_f_log1=function(n){console.log(t(n))},i.wbg.widl_f_set_timeout_with_callback_and_timeout_and_arguments_0Window=function(n,e,){try{return t(n).setTimeout(t(e),_)}catch(n){v(n)}},i.wbg.wbg_chromeportconnect5dc6204b52808a38=function(n,e){var t,=h(n,e);return s((t=_,chrome.runtime.connect(null,{name:t})))},i.wbg.wbg_onDisconnect_1678887fe804d850=function(n){return s(t(n).onDisconnect)},i.wbg.wbg_addListener_2ac5cbd510ccd7c6=function(n,e){t(n).addListener(t(e))},i.wbg.widl_f_set_interval_with_callback_and_timeout_and_arguments_0Window=function(n,e,){try{return t(n).setInterval(t(e),_)}catch(n){v(n)}},i.wbg.wbg_onMessage_39105b92abbad6eb=function(n){return s(t(n).onMessage)},i.wbg.wbg_new_59cb74e423758ede=function(){return s(new Error)},i.wbg.wbg_stack558ba5917b466edd=function(e,){var r=l(t(_).stack,n.wbindgen_malloc,n.wbindgen_realloc),o=c;g()[e/4+1]=o,g()[e/4+0]=r},i.wbg.wbg_error4bb6c2a97407129a=function(e,t){var =h(e,t);0!==e&&n.wbindgenfree(e,t),console.error()},i.wbg.widl_f_document_Window=function(n){var e=t(n).document;return b(e)?0:s(e)},i.wbg.widl_f_create_elementDocument=function(n,e,){try{var r=h(e,_);return s(t(n).createElement(r))}catch(n){v(n)}},i.wbg.widl_f_css_rules_CSSStyleSheet=function(n){try{return s(t(n).cssRules)}catch(n){v(n)}},i.wbg.widl_f_length_CSSRuleList=function(n){return t(n).length},i.wbg.widl_f_insert_rule_with_indexCSSStyleSheet=function(n,e,,r){try{var c=h(e,_);return t(n).insertRule(c,r>>>0)}catch(n){v(n)}},i.wbg.widl_f_getCSSRuleList=function(n,e){var =t(n)[e>>>0];return b()?0:s()},i.wbg.widl_f_style_CSSStyleRule=function(n){return s(t(n).style)},i.wbg.widl_f_set_typeHTMLStyleElement=function(n,e,){var r=h(e,_);t(n).type=r},i.wbg.widl_f_head_Document=function(n){var e=t(n).head;return b(e)?0:s(e)},i.wbg.widl_f_append_child_Node=function(n,e){try{return s(t(n).appendChild(t(e)))}catch(n){v(n)}},i.wbg.widl_f_sheet_HTMLStyleElement=function(n){var e=t(n).sheet;return b(e)?0:s(e)},i.wbg.wbindgen_cb_forget=function(n){r(n)},i.wbg.wbg_new_3a746f2619705add=function(n,e){var t=h(n,e);return s(new Function(t))},i.wbg.wbg_call_f54d3a6dadb199ca=function(n,e){return s(t(n).call(t(e)))},i.wbg.wbindgen_jsval_eq=function(n,e){return t(n)===t(e)},i.wbg.wbg_self_ac379e780a0d8b94=function(n){return s(t(n).self)},i.wbg.wbg_crypto_1e4302b85d4f64a2=function(n){return s(t(n).crypto)},i.wbg.wbindgen_is_undefined=function(n){return void 0===t(n)},i.wbg.wbg_getRandomValues_1b4ba144162a5c9e=function(n){return s(t(n).getRandomValues)},i.wbg.wbg_require_6461b1e9a0d7c34a=function(n,e){var t=h(n,e);return s(require(t))},i.wbg.wbg_randomFillSync1b52c8482374c55b=function(n,e,){t(n).randomFillSync(p(e,_))},i.wbg.wbg_getRandomValues1ef11e888e5228e9=function(n,e,){t(n).getRandomValues(p(e,_))},i.wbg.wbg_new9e4e8c6fadc05c7a=function(n,e,t,){var r=h(n,e),c=h(t,_);return s(new RegExp(r,c))},i.wbg.widl_f_text_contentNode=function(e,){var r=t(_).textContent,o=b(r)?0:l(r,n.wbindgen_malloc,n.wbindgen_realloc),i=c;g()[e/4+1]=i,g()[e/4+0]=o},i.wbg.widl_f_query_selectorDocument=function(n,e,){try{var r=h(e,_),c=t(n).querySelector(r);return b(c)?0:s(c)}catch(n){v(n)}},i.wbg.widl_f_query_selector_allDocument=function(n,e,){try{var r=h(e,_);return s(t(n).querySelectorAll(r))}catch(n){v(n)}},i.wbg.widl_f_location_Window=function(n){return s(t(n).location)},i.wbg.__widl_f_reload_Location=function(n){try{t(n).reload()}catch(n){v(n)}},i.wbg.wbg_removeListener_f1deaca333139c3d=function(n,e){t(n).removeListener(t(e))},i.wbg.widl_f_getNodeList=function(n,e){var =t(n)[e>>>0];return b()?0:s()},i.wbg.wbg_decimal38874f68d559be18=function(e,t){var =l(t.toLocaleString("en-US",{style:"decimal",maximumFractionDigits:2}),n.wbindgen_malloc,n.wbindgenrealloc),r=c;g()[e/4+1]=r,g()[e/4+0]=},i.wbg.wbg_replace8f316f864d6bf31e=function(n,e,,r){var c=h(_,r);return s(t(n).replace(t(e),c))},i.wbg.wbg_exec641c92568d076518=function(n,e,){var r=h(e,_),c=t(n).exec(r);return b(c)?0:s(c)},i.wbg.wbg_length_1881309ca6f2ebd6=function(n){return t(n).length},i.wbg.wbg_get_bf32bf170c3d4d9a=function(n,e){return s(t(n)[e>>>0])},i.wbg.wbg_setlastindex_636403a6b8935149=function(n,e){t(n).lastIndex=e>>>0},i.wbg.widl_instanceof_HTMLInputElement=function(n){return t(n)instanceof HTMLInputElement},i.wbg.widl_f_valueHTMLInputElement=function(e,){var r=l(t(_).value,n.wbindgen_malloc,n.wbindgen_realloc),o=c;g()[e/4+1]=o,g()[e/4+0]=r},i.wbg.widl_f_set_valueHTMLInputElement=function(n,e,){var r=h(e,_);t(n).value=r},i.wbg.widl_f_click_HTMLElement=function(n){t(n).click()},i.wbg.widl_f_length_NodeList=function(n){return t(n).length},i.wbg.widl_f_class_list_Element=function(n){return s(t(n).classList)},i.wbg.widl_f_add_1DOMTokenList=function(n,e,){try{var r=h(e,_);t(n).add(r)}catch(n){v(n)}},i.wbg.widl_instanceof_HTMLElement=function(n){return t(n)instanceof HTMLElement},i.wbg.widl_f_style_HTMLElement=function(n){return s(t(n).style)},i.wbg.wbindgen_object_clone_ref=function(n){return s(t(n))},i.wbg.widl_f_remove_child_Node=function(n,e){try{return s(t(n).removeChild(t(e)))}catch(n){v(n)}},i.wbg.wbg_removeevent73b2322cc4310f4b=function(n,e,,r){var c,o,i,a=h(e,_);c=t(n),o=a,i=t(r),c.removeEventListener(o,i,!1)},i.wbg.widl_f_remove_propertyCSSStyleDeclaration=function(e,,r,o){try{var i=h(r,o),a=l(t(_).removeProperty(i),n.wbindgen_malloc,n.wbindgen_realloc),u=c;g()[e/4+1]=u,g()[e/4+0]=a}catch(n){v(n)}},i.wbg.widl_f_set_property_with_priorityCSSStyleDeclaration=function(n,e,,r,c,o,i){try{var a=h(e,_),u=h(r,c),l=h(o,i);t(n).setProperty(a,u,l)}catch(n){v(n)}},i.wbg.widl_f_get_property_valueCSSStyleDeclaration=function(e,,r,o){try{var i=h(r,o),a=l(t(_).getPropertyValue(i),n.wbindgen_malloc,n.__wbindgen_realloc),u=c;g()[e/4+1]=u,g()[e/4+0]=a}catch(n){v(n)}},i.wbg.widl_f_set_text_contentNode=function(n,e,){var r=h(e,_);t(n).textContent=r},i.wbg.wbg_getextensionurld188f8a1261b87c0=function(e,t,){var r,o=h(t,_),i=l((r=o,chrome.runtime.getURL(r)),n.wbindgen_malloc,n.wbindgen_realloc),a=c;g()[e/4+1]=a,g()[e/4+0]=i},i.wbg.widl_f_set_attributeElement=function(n,e,,r,c){try{var o=h(e,_),i=h(r,c);t(n).setAttribute(o,i)}catch(n){v(n)}},i.wbg.wbg_formatfloat805fb4692319aae4=function(e,t){var =l(t.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}),n.wbindgen_malloc,n.wbindgenrealloc),r=c;g()[e/4+1]=r,g()[e/4+0]=},i.wbg.widl_f_parent_node_Node=function(n){var e=t(n).parentNode;return b(e)?0:s(e)},i.wbg.wbg_addevent5d5369f0d7dd3732=function(n,e,,r){var c,o,i,a=h(e,_);c=t(n),o=a,i=t(r),c.addEventListener(o,i,{capture:!1,once:!1,passive:!0})},i.wbg.wbindgen_throw=function(n,e){throw new Error(d(n,e))},i.wbg.wbindgen_rethrow=function(n){throw r(n)},i.wbg.wbg_then_79de0b6809569306=function(n,e){return s(t(n).then(t(e)))},i.wbg.wbg_resolve_4e9c46f7e8321315=function(n){return s(Promise.resolve(t(n)))},i.wbg.wbg_then5a9068d7b674caf9=function(n,e,){return s(t(n).then(t(e),t(_)))},i.wbg.wbg_globalThis_1c2aa6db3ecb073e=function(){try{return s(globalThis.globalThis)}catch(n){v(n)}},i.wbg.wbg_self_e5cdcdef79894248=function(){try{return s(self.self)}catch(n){v(n)}},i.wbg.wbg_window_44ec8ac43884a4cf=function(){try{return s(window.window)}catch(n){v(n)}},i.wbg.wbg_global_c9abcb94a14733fe=function(){try{return s(global.global)}catch(n){v(n)}},i.wbg.wbg_newnoargs_a9cd98b36c38f53e=function(n,e){var t=h(n,e);return s(new Function(t))},i.wbg.wbg_call_222be890f6f564bb=function(n,e){try{return s(t(n).call(t(e)))}catch(n){v(n)}},i.wbg.widl_instanceof_Window=function(n){return t(n)instanceof Window},i.wbg.wbindgen_closurewrapper190=function(e,t,){const r={a:e,b:t,cnt:1},c=()=>{r.cnt++;const e=r.a;r.a=0;try{return function(e,t){n.wasm_bindgenconvertclosuresinvoke0_muth56a9ccec642a61a2(e,t)}(e,r.b)}finally{0==--r.cnt?n.wbindgen_export_2.get(43)(e,r.b):r.a=e}};return c.original=r,s(c)},i.wbg.wbindgen_closurewrapper787=function(e,t,){const r={a:e,b:t,cnt:1},c=e=>{r.cnt++;const t=r.a;r.a=0;try{return function(e,t,_){n.wasm_bindgenconvertclosuresinvoke1_mut_hbf543a7afe63658a(e,t,s())}(t,r.b,e)}finally{0==--r.cnt?n.wbindgen_export_2.get(43)(t,r.b):r.a=t}};return c.original=r,s(c)},i.wbg.wbindgen_closurewrapper717=function(e,t,){const r={a:e,b:t,cnt:1},c=e=>{r.cnt++;const t=r.a;r.a=0;try{return y(t,r.b,e)}finally{0==--r.cnt?n.wbindgen_export_2.get(43)(t,r.b):r.a=t}};return c.original=r,s(c)},i.wbg.wbindgen_closurewrapper199=function(e,t,){const r={a:e,b:t,cnt:1},c=()=>{r.cnt++;const e=r.a;r.a=0;try{return function(e,t){n.wasm_bindgenconvertclosures__invoke0_muth56a9ccec642a61a2(e,t)}(e,r.b)}finally{0==--r.cnt?n.wbindgen_export_2.get(43)(e,r.b):r.a=e}};return c.original=r,s(c)},i.wbg.wbindgen_closurewrapper801=function(e,t,){const r={a:e,b:t,cnt:1},c=e=>{r.cnt++;const t=r.a;r.a=0;try{return function(e,t,_){n.wasm_bindgenconvertclosuresinvoke1_mut_hbf543a7afe63658a(e,t,s())}(t,r.b,e)}finally{0==--r.cnt?n.wbindgen_export_2.get(43)(t,r.b):r.a=t}};return c.original=r,s(c)},i.wbg.wbindgen_closurewrapper207=function(e,t,){const r={a:e,b:t,cnt:1},o=(e,t)=>{r.cnt++;const =r.a;r.a=0;try{return function(e,t,,r){var o=l(_,n.wbindgen_malloc,n.wbindgen_realloc),i=c;n.wasm_bindgenconvertclosuresinvoke2_muth2baea4b5339c9568(e,t,o,i,s(r))}(_,r.b,e,t)}finally{0==--r.cnt?n.__wbindgen_export2.get(43)(,r.b):r.a=}};return o.original=r,s(o)},"function"==typeof URL&& instanceof URL||"string"==typeof ||"function"==typeof Request&& instanceof Request){const n=fetch();o="function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(n,i).catch(e=>n.then(n=>{if("application/wasm"!=n.headers.get("Content-Type"))return console.warn("WebAssembly.instantiateStreaming failed because your server does not serve wasm with application/wasm MIME type. Falling back to WebAssembly.instantiate which is slower. Original error:\n",e),n.arrayBuffer();throw e}).then(n=>WebAssembly.instantiate(n,i))):n.then(n=>n.arrayBuffer()).then(n=>WebAssembly.instantiate(n,i))}else o=WebAssembly.instantiate(,i).then(n=>n instanceof WebAssembly.Instance?{instance:n,module:}:n);return o.then(({instance:t,module:})=>(n=t.exports,e.wbindgen_wasmmodule=,n.__wbindgen_start(),n))})(chrome.runtime.getURL("js/saltybet.wasm")).catch(console.error); //# sourceMappingURL=saltybet.js.map

Pauan commented 4 years ago

I've seen that error a couple times, but it's really rare. It goes away when I reload the extension (not re-installing, just reloading). Does that fix it for you?

goldieboy85 commented 4 years ago

unfortunately not. i have tried installing and reinstalling etc. im not nearly as skilled as you are but i know the basics of troubleshooting; i cant seem to figure it out, have tried everything. Also, im working on a fresh windows install due to an unrelated backup fail. :/ so the system is nice and clean.

Pauan commented 4 years ago

Have you tried this:

  1. Load the extension.

  2. See the error.

  3. Reload it (using the "Reload" button, or the circular arrow), not reinstall.

If that doesn't work, could you give a bit more information: does it error immediately after installing the extension, or does it only error when you open the saltybet.com website?

goldieboy85 commented 4 years ago

Yes, i tried reloading the extension within Chrome per your initial comment. I should have been more clear in my response, sorry about that. I meant to mention that I have attempted installing and reinstalling as some more general type info for you. And yes, it errors immediately following installation. As soon as i load the static folder the error is produced.

More general info: I installed via git clone in GitBash, not the zip file download.

I should also mention that the first error in my first comment (the shorter one) is the error produced when loading the static folder from "Load unpacked". The second error in my second comment (much longer) is produced when i load saltybet.com website.

Pauan commented 4 years ago

Okay, so could you go into the Extensions page, click on the background.html link, then post a screenshot of that?

Also, what version of Chrome are you using?

goldieboy85 commented 4 years ago

Capture

I am using the latest official build version of Chrome, version 79.0.3945.88. 64 bit.

slippyyy commented 4 years ago

I am having the exact same issue here.

Veeloa commented 4 years ago

I just started getting this error too

Pauan commented 4 years ago

@goldieboy85 I just pushed a new version, please upgrade and then take another screenshot of the background.html page.

goldieboy85 commented 4 years ago

@Pauan Updated and new screenshot attached. Capture

Pauan commented 4 years ago

Thanks! That helps a lot.

Whoops, when I was doing the recent migration I accidentally left in some debugging code, which was tripping it up. It only broke on completely fresh installations, not existing ones.

I've fixed it, and released a new version. You'll need to uninstall and reinstall (this will delete all your record data, so make sure to export first!)

(If you created a fresh installation, then you don't need to export)