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

The imported flow configuration cannot be automatically saved #5665

Open
5 tasks done
Geek-Bob opened this issue Jun 27, 2024 · 4 comments
Open
5 tasks done

The imported flow configuration cannot be automatically saved #5665

Geek-Bob opened this issue Jun 27, 2024 · 4 comments
Labels
🌊 feat:workflow Workflow related stuff.

Comments

@Geek-Bob
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.5

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

The imported flow configuration cannot be automatically saved
Current BUG module:chat flow

Snipaste_2024-06-27_16-13-51 As you belong, there is no auto-save prompt, only post prompt

✔️ Expected Behavior

automatically saved

❌ Actual Behavior

The imported flow configuration cannot be automatically saved

@dosubot dosubot bot added the 🌊 feat:workflow Workflow related stuff. label Jun 27, 2024
@Geek-Bob
Copy link
Author

Snipaste_2024-06-27_16-35-19

Uncaught (in promise) TypeError: Failed to fetch
at 5079-09e911dc198f986f.js:1:17587
at new Promise ()

Copy link

dosubot bot commented Jun 27, 2024

To resolve the issue where the imported flow configuration in your self-hosted Dify version 0.6.5 cannot be automatically saved, and to address the JavaScript error TypeError: Failed to fetch with a net::ERR_EMPTY_RESPONSE during a debugging session, you should ensure that the URL being fetched is correct and that the server is properly responding to the requests.

Here are some steps to troubleshoot and resolve the issue:

  1. Check the URL: Ensure that the chatbotUrl being saved and fetched is correct and accessible. You can do this by manually visiting the URL in your browser to see if it responds correctly.

  2. Server Response: Ensure that the server is running and properly configured to handle the requests. Check the server logs for any errors or issues that might be causing it to not respond.

  3. Network Issues: Ensure there are no network issues preventing the request from reaching the server. This can include firewall settings, network configurations, or other network-related issues.

  4. Browser Console: Check the browser console for more detailed error messages that might give more insight into why the request is failing.

Here is the relevant part of the code that handles saving the chatbotUrl:

document.getElementById('save-button').addEventListener('click', function (e) {
  e.preventDefault();
  const chatbotUrl = document.getElementById('chatbot-url').value;
  const errorTip = document.getElementById('error-tip');

  if (chatbotUrl.trim() === "") {
      errorTip.textContent = "Dify ChatBot URL cannot be empty.";
  } else {
    errorTip.textContent = "";

    chrome.storage.sync.set({
      'chatbotUrl': chatbotUrl,
    }, function () {
      alert('Save Success!');
    });
  }
});

And the part that loads the chatbotUrl:

chrome.storage.sync.get(['chatbotUrl'], function (result) {
  const chatbotUrlInput = document.getElementById('chatbot-url');

  if (result.chatbotUrl) {
    chatbotUrlInput.value = result.chatbotUrl;
  }
});

Ensure that the chatbotUrl is correctly set and retrieved from chrome.storage.sync. If the issue persists, further investigation into the server-side code and network configurations will be necessary [[1]](https://github.com/langgenius/dify/blob/main/third-party/chrome plug-in/options.js).

To continue talking to Dosu, mention @dosu.

@Geek-Bob
Copy link
Author

It's not the URL, because when you delete all the nodes, it's automatically saved

@Geek-Bob
Copy link
Author

Imported **.yml file code nodes with the following two lines will not refresh automatically.

function main({arg1, empNoStr}) {

   var newStr= arg1.replace(/```json\\n|```/g, '');
    var timestamp=Date.now().toString();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

1 participant