How do I find error shown in specific .js line?

0 favourites
  • 6 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I put months of work into my first game, never exported it though in later versions, just tested it daily in C2´s previewer & debugger from the capx file. Today after finally managing implementing highscores on a mysql database I did my first export and uploaded, ready to finish it.

    I get a damned black screen after the preloader icon and progress bar finish loàding! Pretty desperate...

    In FF I managed to see my game menu layout once, never after. I´m used to get and solve game breaking errors every day but this is a bit much

    First I removed the recent Ajax additions, nope wasn´t it. Developer tools in FF and Chrome show me different errors. FF is missing some sound formats, probably a MIME type thing, so I deleted all sounds from project, didn´t help. Also deleted all Spriter files & assets to see if that is the issue. Apparently not.

    Chrome´s developer tools console shows this error dozens of times a second->

    c2runtime.js:243 Uncaught TypeError: Cannot read property 'type' of null.

    FF konsole says error is in

    C2runtime_ 243:145

    Could "type" be an undefined variable of same name I use in certain object families?

    In C2´s previewer the game runs without problems though.

    So does the runtime line 243 from browser help me somehow find the reason for all this or does anybody have an idea what´s going on here?

  • Null probably means it's a plugin as C2 itself doesn't use that by default.

    Getting it every second would means its running every tick.

    I would start by updating any third party plugs.

    Spriter being the most obvious place to start.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks newt, it´s probably something else. After I removed the plugin (it is the only 3rd party thing I´m using) and anything else suspicious the problem persisted. Started to roll back to some very early version adding 1 thing at a time + export + upload to find out what causes it. A very time consuming and annoying process since browser cache is a b*** and I need to change URL all the time (a most primitive method I guess) to prevent cache showing wrong versions.

  • I feel like a dumb monkey.

    After running numerous tests I figured FF on two different webhosts does not load any image file and gets stuck after having displayed the C2 splash screen.

    For testing I created a new empty project in C2 with default settings, adding 1 single grey box sprite, event sheet is blank, and exported, uploaded.

    try here:

    -> splash screen -> doesn´t even switch to the layout. works in editor preview though.

    capx is:

    error is:

    Error loading image '': error { target: <img>, isTrusted: true, currentTarget: <img>, eventPhase: 2, bubbles: false, cancelable: false, defaultPrevented: false, timeStamp: 1467056079622000, originalTarget: <img>, explicitOriginalTarget: <img>, NONE: 0 }

    I must be I missing something basic & general when exporting to html in C2? this is weird I used this method to host 2 other little projects like 2 years before.

  • Have you tried re-uploading the images?

    when i go to the image url with the browser the image doesn't show.


    the image is definitely there,

    in filezilla I changed the CHMOD file permissions to 644 for any files or 755 for the images directory to check they are permitted publicly. tried setting png recompression to none in exporter. tried saving the png manually from C2´s animation editor and reuploading to check if it gets corrupted in export process somehow. browser konsole is showing MIME type is set correctly to images/png... I´m running out of ideas.

    [quote:1l3jgicz]The image [image] cannot be displayed because it contains errors.

    this is really weird, the png to show the splah screen C2 logo is working.

    will try to upload to google drive next and see if this persists.

    edit: the thing on google drive works

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)