#Failure at importing librarys from appsmith recommended site

1 messages · Page 1 of 1 (latest)

frozen grail
sick arrowBOT
#

Hello! I'm Appsmith Support Bot, here to assist you with your Appsmith queries. If you're experiencing issues with importing a library and the download animation is taking too long without any error message, it might be due to network issues or a temporary glitch with the CDN.

Here are a few steps you can try:

  1. Check Network Connection: Ensure that your internet connection is stable.

  2. Clear Cache: Try clearing your browser cache and reloading the Appsmith editor.

  3. Use a Different CDN: If jsDelivr is not working, you can try using another CDN like unpkg. For example, you can use:

https://unpkg.com/[email protected]/dist/FileSaver.min.js

  1. Manual Import: Download the library file manually and upload it to your Appsmith application if the platform supports it.

  2. Check Console for Errors: Open the browser's developer console to see if there are any error messages that might give more insight into the issue.

If the problem persists, please let me know, and we can explore further options.

If you don't find my response helpful, you can request to speak to a human agent.

next horizon
#

hi @frozen grail , thanks for reporting this. I just tried the min.js and the esm version and both of them did the same thing you described. No error, just stuck at the spinning animation.

I found another CDN link that does work though:
https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.js

Not sure why the jsdelivr version doesn't work. I'll pass this along to the team and see what we can find out.

sick arrowBOT
#

If you've found that the CDN link from cdnjs works, you can use that as an alternative. Here's how you can include it in your Appsmith application:

  1. Add the Library: Go to the "Libraries" section in Appsmith and add the following URL:

https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.js

  1. Use the Library: Once added, you can use the FileSaver functionality in your JavaScript code within Appsmith. For example:

const blob = new Blob(["Hello, world!"], { type: "text/plain;charset=utf-8" });
saveAs(blob, "hello_world.txt");

This should allow you to use the FileSaver library without issues. If you encounter any further problems, feel free to ask for more assistance!

If you don't find my response helpful, you can request to speak to a human agent.

frozen grail
sick arrowBOT
#

In Appsmith, there are a few considerations to keep in mind when importing libraries:

  1. Library Size: Large libraries might take longer to load, and if the network is slow, it might seem like it's stuck.

  2. Network Restrictions: Ensure there are no network restrictions or firewalls blocking access to certain CDNs.

  3. Library Compatibility: Not all libraries are compatible with Appsmith. Ensure the library is suitable for use in a browser environment.

  4. CDN Reliability: Sometimes, specific CDNs might have temporary issues. Trying a different CDN can often resolve the problem.

  5. Version Conflicts: Ensure there are no version conflicts with other libraries or the Appsmith environment.

If you continue to face issues with multiple libraries, it might be worth checking these aspects or reaching out to Appsmith support for further assistance.

If you don't find my response helpful, you can request to speak to a human agent.

frozen grail
sick arrowBOT
#

The error message "Library is unsupported" indicates that the library you are trying to import is not compatible with Appsmith due to platform limitations. Some common reasons for this include:

  1. DOM Access: Libraries that require direct access to the DOM or the window object are not supported because Appsmith runs in a sandboxed environment that restricts such access?14:8?discord-support-1.json?.

  2. Node.js Specific Libraries: Libraries that are designed to run in a Node.js environment and rely on Node-specific modules or APIs cannot be used in Appsmith, which is a browser-based platform?14:11?discord-support-1.json?.

  3. Unsupported Formats: Libraries that are not available in a UMD (Universal Module Definition) format might not be supported, as Appsmith requires libraries to be in a format that can be loaded in a browser environment?14:9?intercom-support2.json?.

If you encounter this issue, you can try the following:

  • Look for Alternatives: Search for alternative libraries that provide similar functionality and are compatible with browser environments.
  • Use REST APIs: If the library is primarily for interacting with a service, consider using REST APIs directly from Appsmith.
  • Custom JS Libraries: If you have control over the library, you might be able to modify it to be compatible with Appsmith's requirements.

If you have a specific use case or need further assistance, feel free to provide more details, and I can help explore alternative solutions.

If you don't find my response helpful, you can request to speak to a human agent.

next horizon
#

Several libraries are blocked for security. We don't allow any libraries that try to access the window or DOM, so those libraries should show an error when trying to import. I'm not sure why the file saver library doesn't show the error though. Checking with the team on it now.

sick arrowBOT
#

As per Appsmith's guidelines, libraries that attempt to access the window object or manipulate the DOM are restricted due to security concerns. This is because Appsmith operates in a sandboxed environment to ensure security and stability.

For libraries like FileSaver that don't show an error but still don't work as expected, it might be due to specific functions within the library that are attempting to access restricted objects or perform operations not allowed in the sandboxed environment.

To address this:

  1. Check Library Documentation: Ensure that the library is designed to work in a browser environment without needing direct DOM or window access.

  2. Use Alternatives: If a library is blocked, look for alternative libraries that provide similar functionality but are compatible with Appsmith's restrictions.

  3. Custom Implementation: If possible, implement the required functionality using custom JavaScript code within Appsmith, avoiding restricted operations.

For more detailed information, you can refer to the Appsmith documentation on library compatibility. If you have specific requirements or need further assistance, feel free to ask!

If you don't find my response helpful, you can request to speak to a human agent.

You can install custom libraries to help you build complex applications and business logic. Custom JavaScript libraries enable complex use cases like PDF generation, CSV Parsing, & authentication. This page shows how to install external JS library and access it in your code.

frozen grail
sick arrowBOT
#

I'm unable to view images directly, but if you're experiencing issues with a specific version of Appsmith, it might be helpful to ensure that you're using the latest stable version. Appsmith frequently updates to fix bugs and improve functionality.

Here are a few steps you can take:

  1. Update Appsmith: Ensure that you are using the latest version of Appsmith. Check the Appsmith website or your deployment method (Docker, Kubernetes, etc.) for the latest version.

  2. Clear Cache: Sometimes, clearing your browser cache can resolve unexpected issues.

  3. Check Release Notes: Review the release notes for any known issues or changes that might affect your use case.

  4. Community Support: If the issue persists, consider reaching out to the Appsmith community or support channels for assistance.

If you have specific error messages or logs, sharing those can help in diagnosing the issue further.

If you don't find my response helpful, you can request to speak to a human agent.

next horizon
sick arrowBOT
#

I'm a support bot and don't have a specific version of Appsmith that I'm using. However, if you're on version 1.59 and the library is importing correctly for you, it suggests that the issue might be specific to the environment or configuration of the instance where it's not working.

Here are a few things you can check or try:

  1. Environment Differences: Ensure that the environment where it's not working has the same network and security settings as the one where it is working.

  2. Browser Compatibility: Check if the issue persists across different browsers or devices.

  3. Network Restrictions: Verify if there are any network restrictions or firewalls that might be blocking access to the CDN.

  4. Appsmith Logs: Check the Appsmith server logs for any error messages that might provide more insight into the issue.

If the problem continues, it might be helpful to reach out to Appsmith support with specific details about the environment and any error messages encountered.

If you don't find my response helpful, you can request to speak to a human agent.

sick arrowBOT
#

If you're using Appsmith version 1.57 and encountering issues with importing libraries, it might be due to differences between this version and later versions like 1.59. Here are a few steps you can consider:

  1. Upgrade Appsmith: Consider upgrading to the latest version of Appsmith if possible. Newer versions often include bug fixes and improvements that might resolve your issue.

  2. Check Release Notes: Review the release notes for versions between 1.57 and 1.59 to see if there are any changes related to library imports or other relevant updates.

  3. Environment Configuration: Ensure that your self-hosted environment is configured correctly and matches the setup of environments where the library import works.

  4. Network and Security Settings: Verify that there are no network restrictions or security settings that might be affecting the import process.

If upgrading is not an option and the issue persists, you might want to reach out to Appsmith support for further assistance, providing them with details about your environment and any error messages you encounter.

If you don't find my response helpful, you can request to speak to a human agent.