AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
10.72k stars 1.09k forks source link

extension builder can not run js code automaFetch and error #1736

Open lslcoded opened 1 month ago

lslcoded commented 1 month ago
image

image

Desktop (please complete the following information):

Additional context

lslcoded commented 1 month ago

image

lslcoded commented 1 month ago

alert('处理下载完成,开始处理下载结果')

var origin_file_name = automaRefData('variables','originFileName');

alert('origin_file_name: '+ origin_file_name);

var extension_id = location.host;

alert('extension_id: '+ extension_id);

automaFetch('json', { url: 'http://127.0.0.1:5100/handle_data', method: 'POST', headers: { 'Content-Type': 'application/json; charset=UTF-8' }, body: JSON.stringify({'origin_file_name':origin_file_name,'extension_id':extension_id}) }) .then(function(data){ alert(data.msg) console.log(data.msg) automaNextBlock({'status':data.status}) }) .catch(function(error){ alert(JSON.stringify(data.msg)) console.log(error); automaNextBlock({'status':0}) });

lslcoded commented 1 month ago

After repeated testing, it was found that as long as the JavaScript script is placed in the backend for execution and then executed as automaFetch, an error will be reported. Please help solve this problem as soon as possible!