You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of some key functions in the extension (such as verifyExtension.js and extract-extension.js) lacks consistent error handling and validation. This can lead to unhandled promise rejections, improper error reporting, and potential crashes when incorrect inputs are provided.
Steps to reproduce
Go to the extension's folder.
Attempt to load a zip file or JSON file with invalid names or structures.
Observe inconsistent error handling or crashes.
In some cases, file extraction might fail silently or without proper error messages.
GDevelop platform
Desktop
GDevelop version
5.1.160
Platform info
OS: Windows, Linux, macOS
OS Version: Windows 10, macOS 11.0
Browser (for Web): Chrome, Firefox
Device (for Mobile): N/A
Additional context
The refactor applies consistent async/await promise handling, improves type checking, and combines redundant loops in various scripts:
verifyExtension.js: Introduced a try-catch block for proper async error handling, added logging, and improved the flow of promise-based error management.
extract-extension.js: Wrapped operations in a try-catch block to streamline promise handling, preventing unhandled rejections.
ExtensionNameValidator.js: Added string validation for the extension name to avoid runtime errors from invalid inputs.
PascalCase.js: Combined loops to reduce code duplication and added type checking to ensure extension names are valid strings.
This improves the overall robustness of the extension and prevents crashes or silent failures in several key processes.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Enter the name of the extension
Promise Handling & Validation Refactor
Describe the bug of the extension
The current implementation of some key functions in the extension (such as verifyExtension.js and extract-extension.js) lacks consistent error handling and validation. This can lead to unhandled promise rejections, improper error reporting, and potential crashes when incorrect inputs are provided.
Steps to reproduce
GDevelop platform
Desktop
GDevelop version
5.1.160
Platform info
Additional context
The refactor applies consistent
async/await
promise handling, improves type checking, and combines redundant loops in various scripts:verifyExtension.js
: Introduced atry-catch
block for proper async error handling, added logging, and improved the flow of promise-based error management.extract-extension.js
: Wrapped operations in atry-catch
block to streamline promise handling, preventing unhandled rejections.ExtensionNameValidator.js
: Added string validation for the extension name to avoid runtime errors from invalid inputs.PascalCase.js
: Combined loops to reduce code duplication and added type checking to ensure extension names are valid strings.This improves the overall robustness of the extension and prevents crashes or silent failures in several key processes.
The text was updated successfully, but these errors were encountered: