• Script file () does not exist

    From Nick Young@1:103/705 to All on Wed Jul 19 16:06:48 2023
    Hey all,

    When pushing a key on the main menu I sometimes get this error:

    !JavaScript /sbbs/exec/default.js line 198: Error: Script file () does not exist

    and

    !JavaScript /sbbs/exec/default.js line 249: Error: Script file () does not exist

    I am running Synchronet 3.20. Has anyone had this error before? I compiled last night so I'm up to date with Git.


    Nick

    ---
    þ Synchronet þ Sent from TFSI BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nick Young on Wed Jul 19 10:55:00 2023
    Re: Script file () does not exist
    By: Nick Young to All on Wed Jul 19 2023 04:06 pm

    Hey all,

    When pushing a key on the main menu I sometimes get this error:

    !JavaScript /sbbs/exec/default.js line 198: Error: Script file () does not exist

    When pushing which key? Does the file exec/str_cmds.js exist?

    and

    !JavaScript /sbbs/exec/default.js line 249: Error: Script file () does not exist

    I am running Synchronet 3.20. Has anyone had this error before? I compiled last night so I'm up to date with Git.

    The exact key sequenced to produce these errors would be helpful. I have not seen these errors myself.
    --
    digital man (rob)

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 86.7øF, 37.0% humidity, 3 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Young@2:250/7 to Digital Man on Wed Jul 19 19:14:22 2023
    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 10:55:00

    When pushing which key? Does the file exec/str_cmds.js exist?

    Yes, exec/str_cmds.js exists. I can reproduce the error by reading a message on a message area, clicking Q, then clicking E quite quickly. So message -> main menu -> email, except it doesn't goto the email menu because the error pops up. The error always pops up after quitting reading a message and then going to the email menu.


    Nick
    --- SBBSecho 3.20-Linux
    * Origin: TFSI - bbs.tfsi.dev (2:250/7)
  • From Digital Man@1:103/705 to Nick Young on Wed Jul 19 13:02:14 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Wed Jul 19 2023 07:14 pm

    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 10:55:00

    When pushing which key? Does the file exec/str_cmds.js exist?

    Yes, exec/str_cmds.js exists. I can reproduce the error by reading a message on a message area, clicking Q, then clicking E quite quickly. So message -> main menu -> email, except it doesn't goto the email menu because the error pops up. The error always pops up after quitting reading a message and then going to the email menu.

    Does the error message actually contain no script filename, literally just "()" ?
    --
    digital man (rob)

    Rush quote #59:
    He's got a force field and a flexible plan, got a date w/fate in a black sedan Norco, CA WX: 93.5øF, 36.0% humidity, 6 mph SSE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Young@1:103/705 to Digital Man on Wed Jul 19 21:19:39 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Wed Jul 19 2023 19:19:15

    Yes, the error is just:

    !JavaScript default.js line 249: Error: Script file () does not exist

    I'm not using the standard Synchronet mail reader, I bet that's it... I'll change to defaults and see if that fixes it.


    Nick

    ---
    þ Synchronet þ Sent from TFSI BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nick Young on Wed Jul 19 17:02:10 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Wed Jul 19 2023 09:19 pm

    Re: Script file () does not exist
    By: Nick Young to Digital Man on Wed Jul 19 2023 19:19:15

    Yes, the error is just:

    !JavaScript default.js line 249: Error: Script file () does not exist

    That is pretty weird. Are you able to recreate this error on any other Synchronet BBS (e.g. Vertrauen)?

    I'm not using the standard Synchronet mail reader, I bet that's it... I'll change to defaults and see if that fixes it.

    I'm not really sure what you're saying there. But I don't think your "mail reader" of choice is the issue either.
    --
    digital man (rob)

    This Is Spinal Tap quote #36:
    Bobbi Flekman: Money talks, and bullshit walks.
    Norco, CA WX: 92.7øF, 32.0% humidity, 15 mph SSE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Young@1:103/705 to Digital Man on Thu Jul 20 01:53:18 2023
    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 17:02:10

    I'm not really sure what you're saying there. But I don't think your "mail reader" of choice is the issue either.

    I am using Digital Distortion's Message Reader... and I've switched back to it and the issue has started again.


    Nick

    ---
    þ Synchronet þ Sent from TFSI BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nightfox@1:103/705 to Nick Young on Wed Jul 19 21:21:20 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Thu Jul 20 2023 01:53 am

    I'm not really sure what you're saying there. But I don't think your
    "mail reader" of choice is the issue either.

    I am using Digital Distortion's Message Reader... and I've switched back to it and the issue has started again.

    Earlier you said you're getting that error when pushing a key at your main menu.. You aren't in the message reader at that point, so I doubt it's related.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Young@2:250/7 to Nightfox on Thu Jul 20 15:46:17 2023
    Re: Script file () does not exist
    By: Nightfox to Nick Young on Wed Jul 19 2023 21:21:20

    Earlier you said you're getting that error when pushing a key at your main menu.. You aren't in the message reader at that point, so I doubt it's related.

    I do agree, but there's no error when using the built-in Synchronet msg reader.


    Nick
    --- SBBSecho 3.20-Linux
    * Origin: TFSI - bbs.tfsi.dev (2:250/7)
  • From Nightfox@1:103/705 to Nick Young on Thu Jul 20 08:45:25 2023
    Re: Script file () does not exist
    By: Nick Young to Nightfox on Thu Jul 20 2023 03:46 pm

    Earlier you said you're getting that error when pushing a key at
    your main menu.. You aren't in the message reader at that point, so
    I doubt it's related.

    I do agree, but there's no error when using the built-in Synchronet msg reader.

    What exactly are you changing to get DDMsgReader set up? That might help point us in the direction to know where the error might be coming from.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nick Young on Thu Jul 20 11:18:55 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Thu Jul 20 2023 01:53 am

    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 17:02:10

    I'm not really sure what you're saying there. But I don't think your "mail reader" of choice is the issue either.

    I am using Digital Distortion's Message Reader... and I've switched back to it and the issue has started again.

    When did the issue go away?
    --
    digital man (rob)

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 90.5øF, 28.0% humidity, 1 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nick Young on Thu Jul 20 12:00:13 2023
    Re: Script file () does not exist
    By: Nick Young to Nightfox on Thu Jul 20 2023 03:46 pm

    Re: Script file () does not exist
    By: Nightfox to Nick Young on Wed Jul 19 2023 21:21:20

    Earlier you said you're getting that error when pushing a key at your main menu.. You aren't in the message reader at that point, so I doubt it's related.

    I do agree, but there's no error when using the built-in Synchronet msg reader.

    What about when using http://wiki.synchro.net/module:msglist ?
    --
    digital man (rob)

    Rush quote #76:
    His reserve a quiet defense, riding out the day's events, the river..Tom Sawyer Norco, CA WX: 92.7øF, 25.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Young@1:103/705 to Digital Man on Thu Jul 20 22:30:20 2023
    Re: Script file () does not exist
    By: Digital Man to Nick Young on Thu Jul 20 2023 12:00:13

    What about when using http://wiki.synchro.net/module:msglist ?

    When I used msglist module, the error stopped. Also the error stops when using default.src/.bin rather than the JS file. Just to confirm, I am using DDMsgReader with default.bin.


    Nick

    ---
    þ Synchronet þ Sent from TFSI BBS
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nightfox@1:103/705 to Digital Man on Thu Jul 20 15:55:50 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Thu Jul 20 2023 10:30 pm

    What about when using http://wiki.synchro.net/module:msglist ?

    When I used msglist module, the error stopped. Also the error stops when using default.src/.bin rather than the JS file. Just to confirm, I am using DDMsgReader with default.bin.

    I'd add that I'm using my own custom JS command shell, and I haven't seen the error that Nick mentioned when using DDMsgReader.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nick Young on Thu Jul 20 16:35:04 2023
    Re: Script file () does not exist
    By: Nick Young to Digital Man on Thu Jul 20 2023 10:30 pm

    Re: Script file () does not exist
    By: Digital Man to Nick Young on Thu Jul 20 2023 12:00:13

    What about when using http://wiki.synchro.net/module:msglist ?

    When I used msglist module, the error stopped. Also the error stops when using default.src/.bin rather than the JS file. Just to confirm, I am using DDMsgReader with default.bin.

    When it works or when it doesn't?
    --
    digital man (rob)

    This Is Spinal Tap quote #29:
    I find lost luggage. I locate mandolin strings in the middle of Austin!
    Norco, CA WX: 95.5øF, 19.0% humidity, 11 mph SE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nightfox@1:103/705 to Digital Man on Thu Jul 20 16:19:02 2023
    Re: Script file () does not exist
    By: Nick Young to Nightfox on Thu Jul 20 2023 03:46 pm

    Earlier you said you're getting that error when pushing a key at
    your main menu.. You aren't in the message reader at that point, so
    I doubt it's related.

    I do agree, but there's no error when using the built-in Synchronet msg reader.

    Regarding Nick's issue, I've confirmed that I can reproduce the issue on my BBS that he described when using the default.js command shell and DDMsgReader.

    I'm wondering if there's something I need to do when DDMsgReader exits that ensures control is passed back to Synchronet properly.. I may need to have a look at msglist.js to see what it might be doing.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nightfox@1:103/705 to Digital Man on Fri Jul 21 10:06:11 2023
    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 10:55 am

    When pushing a key on the main menu I sometimes get this error:

    !JavaScript /sbbs/exec/default.js line 198: Error: Script file ()
    does not exist

    Hi DM,

    I think I've found out what's going on with this error.

    js.exec() is being called to run a script (such as email_sec.js), and I think the current working directory might be changing or something, where it can't find the file in the current working directory.

    In default.js, the 'command' object in main_menu defines 'E' as an object with an 'exec' property of 'email_sec.js'. Then, on line 250 of default.js, it calls this:

    js.exec(menu_cmd.exec, {});

    That's where it outputs the error after running DDMsgReader. DDMsgReader is in a different directory than email_sec.js, which is why I'm wondering if the current working directory is changed, and after that, js.exec() isn't finding the file that is passed to it. I found that it can be fixed by prepending the filename with system.exec_dir (I did it in the command object):

    'E': { exec: system.exec_dir + 'email_sec.js' },

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nightfox on Fri Jul 21 12:37:08 2023
    Re: Script file () does not exist
    By: Nightfox to Digital Man on Fri Jul 21 2023 10:06 am

    Re: Script file () does not exist
    By: Digital Man to Nick Young on Wed Jul 19 2023 10:55 am

    When pushing a key on the main menu I sometimes get this error:

    !JavaScript /sbbs/exec/default.js line 198: Error: Script file ()
    does not exist

    Hi DM,

    I think I've found out what's going on with this error.

    js.exec() is being called to run a script (such as email_sec.js), and I think the current working directory might be changing or something, where it can't find the file in the current working directory.

    It's not that: you can't really depend on a consistent "current working directory" in a multi-threaded program that changes it. So in SBBS, we leave the CWD as the "ctrl" directory, always.

    In default.js, the 'command' object in main_menu defines 'E' as an object with an 'exec' property of 'email_sec.js'. Then, on line 250 of default.js, it calls this:

    js.exec(menu_cmd.exec, {});

    That's where it outputs the error after running DDMsgReader. DDMsgReader is in a different directory than email_sec.js, which is why I'm wondering if the current working directory is changed, and after that, js.exec() isn't finding the file that is passed to it. I found that it can be fixed by prepending the filename with system.exec_dir (I did it in the command object):

    'E': { exec: system.exec_dir + 'email_sec.js' },

    Yeah, I see that js.exec() expects a full path to the script, else it searches up the script's scope for a "js" object and looks for "js.exec_dir" which is the directoy from which the script (in this case, default.js) was executed. This search may not be working correctly after invoking DDMsgReader for some reason. Not sure why.

    In any case, I'm committing a change to have default.js search mods_dir, then exec_dir for the scripts to be executed before passing *that* path to js.exec(). That seems like it'll at least work around this issue.
    --
    digital man (rob)

    Synchronet "Real Fact" #94:
    Synchronet v3.16c was released in August of 2015 (5 years after v3.15b)
    Norco, CA WX: 86.1øF, 50.0% humidity, 10 mph SSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)