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

🤖 Cannot save fiddle #1918

Open
oskarkrawczyk opened this issue Mar 7, 2025 · 24 comments
Open

🤖 Cannot save fiddle #1918

oskarkrawczyk opened this issue Mar 7, 2025 · 24 comments
Assignees

Comments

@oskarkrawczyk
Copy link
Member

oskarkrawczyk commented Mar 7, 2025

Note

If you're unable to save your fiddle.

Please post HTML, CSS and JS and the error number as a comment to this issue.

What's going on?

Long story short, we're fighting spam and scam being posted to JSFiddle on daily basis.

Since January, I've implemented multiple different spam checkers, some automated, other more manual.

Today I've introduced a more complicated spam checker, but it can produce false-positives, which is why it's important to readjust it with the reports you add in comments.

Attach this info while reporting a problem:

  • The error code, starts with ERRW:[...]
  • Are you logged in? Provide your username
  • HTML, CSS, JavaScript

Important

Comments lacking aforementioned info will be deleted

@oskarkrawczyk oskarkrawczyk self-assigned this Mar 7, 2025
@jsfiddle jsfiddle deleted a comment from lmcolvin Mar 7, 2025
@glenthemes

This comment has been minimized.

@Asmera25

This comment has been minimized.

@oskarkrawczyk

This comment has been minimized.

@oskarkrawczyk

This comment has been minimized.

@glenthemes

This comment has been minimized.

@Asmera25
Copy link

Asmera25 commented Mar 9, 2025

@oskarkrawczyk

@Asmera25 Provide the code you're trying to save.

[https://pastebin.com/MaSvfq70] - this is the code i am trying to save and the error code has now changed to (ERRW:1.0:2783) when I tried once, and then the second time it showed this error (ERRW:1.0:1779)

@Asmera25
Copy link

The issue has spread to all the codes I am writing and none of them are being saved to various error codes. I have no idea what happened and I love coding on jsfiddle so I do hope this issue is fixed as soon as possible.

@oskarkrawczyk

This comment has been minimized.

@tomkat-cr
Copy link

tomkat-cr commented Mar 10, 2025

@oskarkrawczyk
Copy link
Member Author

@Asmera25 I've seen the example you've provided a few days ago, when implementing the spam detection feature. Your code was one of the few false-positives, this is because it's not really code that JSFiddle expects - it's not a code snippet for testing (HTML, CSS, JS) but content you post (and perhaps use it elsewhere in an iframe?). To the spam detection this looks suspicious because it has so many characteristings to what our usual spammers post.

I won't be getting into specifics, because I know spammers read this.

Easiest way to get around this problem is upgrade to PRO, there are no spam checks for PRO accounts for obvious reasons.

I also can try to readjust the spam detection, but for now, I don't have an idea how to differentiate your content and spam.

Also, please provide your JSFiddle username.

@oskarkrawczyk
Copy link
Member Author

oskarkrawczyk commented Mar 10, 2025

@tomkat-cr Are you logged in while trying to save this? And what's your username?

@tomkat-cr
Copy link

@tomkat-cr Are you logged in while trying to save this?

Yes

@KeyboardRage
Copy link

KeyboardRage commented Mar 10, 2025

  • The error code: ERRW:1.0:5095
  • I am logged in, Virty
  • Note: I on a VPN from work.

Code

HTML, JS, and CSS

The HTML breaks GitHub because it contains some markdown: https://pastebin.com/raw/LYpdXgas

const output = document.getElementById("mdit-output");
const input = document.getElementById("sampleData").textContent;

const md = markdownit("zero")
	.enable([
  	"emphasis",
    "link",
    "strikethrough",
    "list",
  ]);
output.innerHTML = md.render(input);
#sampleData {
  display: none;
}

@oskarkrawczyk

This comment has been minimized.

@oskarkrawczyk
Copy link
Member Author

oskarkrawczyk commented Mar 10, 2025

@KeyboardRage I can saved that code (https://jsfiddle.net/oskar/j6bna3ox/4/). Can you try again? Perhaps the VPN is the problem here.

@KeyboardRage
Copy link

KeyboardRage commented Mar 11, 2025

@oskarkrawczyk

I tried again without the VPN briefly after I posted above, but still got the error (although different code, I guess they are unique?). I'll try again now though

Edit:

I went to a different tab, reloaded the page, pasted the unsaved code, and then tried saving. I was not connected to VPN. I still got the error, code ERRW:1.0:4767.

My Fiddle was also named Markdown It limiter support test, in case names also affect the spam filter. Other than that, I can confirm that your fiddle looks exactly like how mine is supposed to be after saving

@matthiasprieth
Copy link

matthiasprieth commented Mar 11, 2025

All my projects also stopped working recently I can not save anything anymore. Always get this error:
Error: Cannot save this fiddle. (ERRW:0.6:xxxx)

I played around a bit and found out that it starts working again after I remove a couple of links like <a href="https://www.example.com">example</a> in my html. It starts working again if I just add a typo in hptps:// for example. Is there a limitation for standard users regarding links without a proper error message?

@oskarkrawczyk
Copy link
Member Author

oskarkrawczyk commented Mar 11, 2025

@matthiasprieth read the info requirements above and edit your comment with all that's needed info (username, code, etc).

@oskarkrawczyk oskarkrawczyk pinned this issue Mar 11, 2025
@Asmera25
Copy link

@Asmera25 I've seen the example you've provided a few days ago, when implementing the spam detection feature. Your code was one of the few false-positives, this is because it's not really code that JSFiddle expects - it's not a code snippet for testing (HTML, CSS, JS) but content you post (and perhaps use it elsewhere in an iframe?). To the spam detection this looks suspicious because it has so many characteristings to what our usual spammers post.
I won't be getting into specifics, because I know spammers read this.
Easiest way to get around this problem is upgrade to PRO, there are no spam checks for PRO accounts for obvious reasons.
I also can try to readjust the spam detection, but for now, I don't have an idea how to differentiate your content and spam.
Also, please provide your JSFiddle username.

Yea I do use this to post content in an iframe on a site, I wish I was able to upgrade to pro but financial restrictions prevent me from doing it sad face. I do hope something of a fix is implemented as I enjoy using js for the codes I make and wish to continue using the platform
My jsfiddle username is Ala25

@matthiasprieth
Copy link

matthiasprieth commented Mar 12, 2025

Hi @oskarkrawczyk it' just HTML:

Error: Cannot save this fiddle. (ERRW:1.0:9186)
Username: storebox (but it doesn't matter if logged in, error also appears if not logged in)
Code (error occurs with simple HTML only): https://paste.ee/p/uGAK2RNx#l6y63rFM7O_DXyuVrsPLj_OvNjQRFQHw

@jsfiddle jsfiddle deleted a comment from mojjalia Mar 13, 2025
@GabrielWQS
Copy link

GabrielWQS commented Mar 14, 2025

@mark05e
Copy link

mark05e commented Mar 14, 2025

Cannot save this fiddle. (ERRW:1.0:1579)
I'm logged in. Pasted an except of the code here https://pastebin.com/h3n1fFXY

@jsfiddle jsfiddle deleted a comment from BubblyBandit Mar 17, 2025
@jsfiddle jsfiddle deleted a comment from bishnu-07 Mar 19, 2025
@SoCuul
Copy link

SoCuul commented Mar 20, 2025

Error Code

{"error":"Cannot save this fiddle. (ERRW:0.7:7323)"}

Signed-In

Yes, with the username SoCuul


HTML

<pre id="pre1">
    scene.setBackgroundImage(img``)
    arrow = sprites.create(img``, SpriteKind.Arrow)
    game.splash("Be the quickest to match", "arrow directions to win!")
</pre>

<pre id="pre2">
    gapImage = image.create(2, scene.screenHeight())
    gapSprite = sprites.create(gapImage, SpriteKind.Gap)
    gapSprite.setFlag(SpriteFlag.AutoDestroy, true)
    gapSprite.setFlag(SpriteFlag.Invisible, true)
    gapSprite.vx = -45
    projectile = sprites.createProjectileFromSide(topImage, -45, 0)
    projectile.top = 0
    projectile = sprites.createProjectileFromSide(bottomImage, -45, 0)
    projectile.bottom = scene.screenHeight()
</pre>

JavaScript (or actually TypeScript here)

var makeCodeRenderPre = makeCodeRenderPre || (function () {
    // pre waiting to be rendered
    // when undefined, iframe is loaded and ready
    var pendingPres = [];
    function injectRenderer() {
        var f = document.getElementById("makecoderenderer");
        // check iframe already added to the DOM
        if (f) {
            return;
        }
        var f = document.createElement("iframe");
        f.id = "makecoderenderer";
        f.style.position = "absolute";
        f.style.left = 0;
        f.style.bottom = 0;
        f.style.width = "1px";
        f.style.height = "1px";
        f.src = "https://arcade.makecode.com/--docs?render=1"
        document.body.appendChild(f);
    }

    function renderPre(pre) {
        console.log('render ' + pre.id)
        var f = document.getElementById("makecoderenderer");
        // check if iframe is added and ready (pendingPres is undefined)
        if (!f || !!pendingPres) {
            // queue up
            pendingPres.push(pre);
            injectRenderer();
        } else {
            f.contentWindow.postMessage({
                type: "renderblocks",
                id: pre.id,
                code: pre.innerText
            }, "https://arcade.makecode.com/");
        }
    }

    // listen for messages
    window.addEventListener("message", function (ev) {
        var msg = ev.data;
        if (msg.source != "makecode") return;

        console.log(msg.type)
        switch (msg.type) {
            case "renderready":
                // flush pending requests            				
                var pres = pendingPres;
                // set as undefined to notify that iframe is ready
                pendingPres = undefined;
                pres.forEach(function (pre) { renderPre(pre); })
                break;
            case "renderblocks":
                var svg = msg.svg; // this is an string containing SVG
                var id = msg.id; // this is the id you sent
                // replace text with svg
                var img = document.createElement("img");
                img.src = msg.uri;
                img.width = msg.width;
                img.height = msg.height;
                var code = document.getElementById(id);
                code.parentElement.insertBefore(img, code)
                code.parentElement.removeChild(code);
                break;
        }
    }, false);

    return renderPre;
})();

function renderSnippets() {
    // TODO ADD RENDER LOGIC HERE
    let pres = document.getElementsByTagName("pre");
    Array.prototype.forEach.call(pres, function (pre) {
        makeCodeRenderPre(pre);
    })
}

// load the renderer
renderSnippets();


// message signatures
interface SimulatorMessage {}

interface RenderBlocksRequestMessage extends SimulatorMessage {
    type: "renderblocks",
    id: string;
    code: string;
    options?: {
        package?: string;
        packageId?: string;
        snippetMode?: boolean;
    }
}

interface RenderBlocksResponseMessage extends SimulatorMessage {
    source: "makecode",
    type: "renderblocks",
    id: string;
    svg?: string;
    width?: number;
    height?: number;
}
// message signatures

CSS

@speleoluc
Copy link

Fiddle save fails with ERRW:1.0:6554

I am not logged in.

The HTML I was trying to save is at https://auriga.top/tmp/outer.html

Luc Le Blanc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants