Sketchware-Pro icon indicating copy to clipboard operation
Sketchware-Pro copied to clipboard

Custom Blocks Disappeared After Deleting Some Old Blocks

Open IhtishamAliii opened this issue 2 years ago • 6 comments

Screenshot_20220309-113552

Custom Blocks Error

As You Can See In The Screenshot Above I've Multiple Custom Blocks. So I Deleted An Old Pallette Above And Now Every Pallette Shows Zero Blocks. It's Just Disappeared And The Errors Says

Invalid pallette number value type in custom blocks

Kindly Help Me :(

UPDATE WITH SOLUTION 😻

So Basically I Looked Up Into The Issue Myself And Found Out That When You're Deleting A Palette And Click On MOVE TO RECYCLE BIN Instead Of REMOVE PERMANENTLY

Screenshot_20220309-192557

The Palette Will Just Won't Show Up In The Block Manager Listview Because You Clicked MOVE TO RECYCLE BIN And The Codes Of That Palette Will Stay Remain In The JSON File Where It Caused The Trouble Because Every Palette Has A Number And When You Click On MOVE TO RECYCLE BIN The Number Get Change To Some Other Random Number Like -1. So When You Open Block Manager The Listview Will Try To Load Data From JSON File Where As I Mentioned The Palette Number It's The Key Of Every listMap And With The Wrong Key The App Will Crash In Sketchware Pro 6.3 And Will Give Exception In Sketchware Pro 6.4/Beta

Solution 🤩

Don't Ever Try To Click On MOVE TO RECYCLE BIN Just Delete It Permanently And If You're Not Sure Just Export The File And And Delete Permanently If You Want To Use It Later.

Solution For Who've Lost Their Custom Blocks 🤩

First Of All Your Codes Are Safe In The JSON File /storage/emulated/0/.sketchware/resources/block/My Block/block.json. It's Just The App Which Won't Load The File. So The Trick Here Is To Also Remove All Those Codes From The JSON File Which You've Moved To The Recycle Bin In The Block Manager.

REQUEST TO THE MODDER TEAM

@Sketchware-Pro Kindly Look Into This Issue And Fix The Problem Or Just Remove The Recycle Bin Button From The Dialog Box.

Still If Anyone Is Facing Any Issue Feel Free To Contact Me ☺️

THANK YOU ♥️

IhtishamAliii avatar Mar 09 '22 06:03 IhtishamAliii

Oh no, did you make a backup of your .sketchware folder, or at least Custom Blocks?

Anyway, can you upload the files block.json, menu.json, and palette.json in /Internal storage/.sketchware/resources/block/My Block/ here? That would help diagnose your issue a lot.

JavkhlanK avatar Mar 09 '22 07:03 JavkhlanK

it happens to me too and since then i didnt use the block manager anymore if you wanna restore your own blocks you need to backup the corrupted blocks folder elswere then open sk ones it will create new files then grab your own Custom block from block.json you can import it and select blocks one by one and recreate there new palette

waelchateur avatar Mar 09 '22 08:03 waelchateur

it happens to me too and since then i didnt use the block manager anymore if you wanna restore your own blocks you need to backup the corrupted blocks folder elswere then open sk ones it will create new files then grab your own Custom block from block.json you can import it and select blocks one by one and recreate there new palette

Yeah Thanks Buddy, I Got It Fixed By Removing Unused Blocks From The JSON File. And The Actually Problem Is In The Move To Recycle bin Button Which Cause All The Problem So Never Use That Button Just Remove Permanently:)

IhtishamAliii avatar Mar 09 '22 08:03 IhtishamAliii

Oh no, did you make a backup of your .sketchware folder, or at least Custom Blocks?

Anyway, can you upload the files block.json, menu.json, and palette.json in /Internal storage/.sketchware/resources/block/My Block/ here? That would help diagnose your issue a lot.

Got It Fixed Buddy... Thank'ya Modder Team Needs To Fix The Move to recycle bin Button. That's what caused the Issue.

IhtishamAliii avatar Mar 09 '22 08:03 IhtishamAliii

Reopen this. Needs investigation

khaled-0 avatar Mar 09 '22 13:03 khaled-0

Okay, I looked into that, and everything sounds alright. The Blocks get a palette number of -1 as they're in the Recycle bin, and moving an entire Palette of (2) Blocks worked fine on my device.

There's some other issue though, and that's the part about invalid palette number value types in Custom Blocks, the message containing type means the palette number isn't specified at all, or is of wrong type. Could you upload block.json if it's causing such issues in Sketchware Pro v6.4.0?

JavkhlanK avatar May 11 '22 19:05 JavkhlanK