• Shared avatar issues - corrupted JSON data in SYNCDATA sub?

    From Hm Derdoc@VERT/FUTURELD to All on Wed Oct 22 11:11:34 2025
    Despite the fact that my AVAT-IN event seems to fire without warning, I have yet to
    have received any avatars via the sharing feature. It's possible that based on the
    data I have in my SYNCDATA sub that might be expected behavior, but that is to also
    say I have around 2900 messages in that sub but nearly 2000 messages in a row spit
    out parse errors on JSON data. That's TLDR ahead of time.

    I am running this command to rescan the message base for avatars:

    `./jsexec avatars.js import=DOVE-SYNCDATA -ptr=0 -all`

    The initial parsing of the older messages goes fine, the initial logs (edited for
    brevity) go smoothly until msg #109:

    ```
    Opening msgbase /sbbs/data/subs/dove-syncdata
    Importing msg #1 from Weatherman: parsed 4 avatarssuccess
    Importing msg #3 from RickV: parsed 0 avatarssuccess
    ...
    Importing msg #108 from Vela025: parsed 5 avatarssuccess
    Importing msg #109 from Dark Angel: !invalid or missing JSON block, length: 1, begin: undefined, end: undefined
    FAILED
    Importing msg #110 from digital man: !invalid or missing JSON block, length: 1, begin: undefined, end: undefined
    ```

    That parsing error repeats in my logs all the way until message #1801:

    ```
    mporting msg #1800 from digital man: !invalid or missing JSON block, length: 1, begin: undefined, end: undefined
    FAILED
    Importing msg #1801 from Fercho: !invalid or missing JSON block, length: 1, begin:
    undefined, end: undefined
    FAILED
    Importing msg #1803 from Nelgin: parsed 14 avatarssuccess
    ```

    We see a lot of "parsed # avatarsuccess" until we get to message #1955, which according to logs is a message from me, and an error is thrown (maybe preventing
    .bin files being written to text/avatars at end of process?):

    ```
    Importing msg #1954 from StingRay: parsed 1 avatarssuccess
    !JavaScript /sbbs/exec/load/avatar_lib.js line 70: TypeError: netaddr is undefined
    Importing msg #1955 from HM Derdoc: /sbbs/repo/exec/avatars.js executed in 0.77 seconds
    !Module (avatars.js) set exit_code: 1
    ```

    I'm not sure if the TypeError is from msg #1954 or #1955, but that's where it bails. I guess I could see if I can get that to fail more gracefully, probably could, but
    I guess if it's a synchronet or dovenet data issue it's probably better to reach outbefore i implement a hack for it.

    Anyone else not seeing any shared avatars lately? (I actually have none, but I've
    only been up and running ~2 months)

    thanks,
    derdoc

    ---
    þ Synchronet þ \1g telnet://\1n\1!Gfutureland.today \1c https://\1n\1!Cblockbra.in\1n
  • From Digital Man@VERT to Hm Derdoc on Wed Oct 22 21:22:17 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Hm Derdoc to All on Wed Oct 22 2025 11:11 am

    Despite the fact that my AVAT-IN event seems to fire without warning,

    AVAT-IN is a timed event, so it'll "fire" (executed) based on its configured interval.

    I have
    yet to have received any avatars via the sharing feature. It's possible that based on the data I have in my SYNCDATA sub that might be expected behavior, but that is to also say I have around 2900 messages in that sub but nearly 2000 messages in a row spit out parse errors on JSON data.
    That's TLDR ahead of time.

    I am running this command to rescan the message base for avatars:

    `./jsexec avatars.js import=DOVE-SYNCDATA -ptr=0 -all`

    I don't recall avatars.js being designed to run via jsexec. Although it might, that's not really the intention - you run it as a timed event. If you want to force the timed event to run on demand or modify the command-line that runs as an event, you can do that too.

    That may or may not have anything to do with the errors you're seeing, I'm not sure.
    --
    digital man (rob)

    Synchronet "Real Fact" #80:
    85 SBBSecho registrations were sold (at $49) between 1994 and 1996
    Norco, CA WX: 59.8øF, 77.0% humidity, 2 mph WNW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Hm Derdoc on Wed Oct 22 21:30:21 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:22 pm

    I don't recall avatars.js being designed to run via jsexec. Although it might, that's not really the intention - you run it as a timed event. If you want to force the timed event to run on demand or modify the command-line that runs as an event, you can do that too.

    I see from the wiki that indeed avatars.js was designed to run some commands via jsexec. I'll see if I can reproduce the errors you're reporting.
    --
    digital man (rob)

    Synchronet "Real Fact" #112:
    Weedpuller "Congenial" http://youtu.be/MrN2Kwrj8lY
    Norco, CA WX: 59.8øF, 77.0% humidity, 4 mph NW wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Hm Derdoc on Wed Oct 22 21:47:02 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:30 pm

    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:22 pm

    I don't recall avatars.js being designed to run via jsexec. Although it might, that's not really the intention - you run it as a timed event. If you want to force the timed event to run on demand or modify the command-line that runs as an event, you can do that too.

    I see from the wiki that indeed avatars.js was designed to run some commands via jsexec. I'll see if I can reproduce the errors you're reporting.

    So I downloaded all the syncdat messages on VERT in QWK packet and imported into a new install of SBBS and then run 'jsexec avatars import':

    ...
    Importing msg #5112 from Karloch: parsed 8 avatarssuccess
    Importing msg #5113 from Jason: parsed 4 avatarssuccess
    Importing msg #5114 from StingRay: parsed 16 avatarssuccess
    Importing msg #5115 from Luis Silva: parsed 3 avatarssuccess
    new import_ptr = 5115
    Imported 3384 messages
    /sbbs/exec/avatars.js executed in 13.70 seconds

    This imported custom user avatars:

    ll ~/sbbs/data/qnet/
    total 800
    -rw-r--r-- 1 rswindell rswindell 957 Oct 22 21:38 AEFINITY.avatars.ini -rw-r--r-- 1 rswindell rswindell 498 Oct 22 21:39 ALCABBS.avatars.ini -rw-r--r-- 1 rswindell rswindell 584 Oct 22 21:38 ALCATRAZ.avatars.ini -rw-r--r-- 1 rswindell rswindell 584 Oct 22 21:38 ALT119.avatars.ini -rw-r--r-- 1 rswindell rswindell 516 Oct 22 21:38 ALTERANT.avatars.ini

    ... and shared avatar collections:

    sbbs3$ ll ../../text/avatars/

    total 60
    -rw-r--r-- 1 rswindell rswindell 6758 Feb 2 2023 corporate.bin
    -rw-r--r-- 1 rswindell rswindell 3729 Feb 2 2023 danger.bin
    -rw-r--r-- 1 rswindell rswindell 2526 Feb 2 2023 DIGDIST.startrek.bin -rw-r--r-- 1 rswindell rswindell 1422 Feb 2 2023 ECBBS.animals.bin
    -rw-r--r-- 1 rswindell rswindell 2526 Feb 2 2023 ECBBS.emoji.bin
    -rw-r--r-- 1 rswindell rswindell 2158 Feb 2 2023 ECBBS.gaming.bin
    -rw-r--r-- 1 rswindell rswindell 2289 Feb 2 2023 GUARDIAN.profile.bin -rw-r--r-- 1 rswindell rswindell 3446 Feb 2 2023 musical.bin
    -rw-r--r-- 1 rswindell rswindell 2755 Feb 2 2023 README.TXT
    -rw-r--r-- 1 rswindell rswindell 1569 Feb 2 2023 silhouettes.bin
    -rw-r--r-- 1 rswindell rswindell 4550 Feb 2 2023 starwars.bin
    -rw-r--r-- 1 rswindell rswindell 2769 Oct 22 21:38 VERT.misc.bin
    -rw-r--r-- 1 rswindell rswindell 1974 Oct 22 21:38 VERT.zeus_ii.bin

    With no errors. Seemed to work as expected (other than the rather unfortunate console/log output).

    Maybe take a look at the messages in your SYNCDATA echo and see what's up with them? In sure you downloaded them (in QWK packets) using a QWKnet account (not a normal user account) as well.
    --
    digital man (rob)

    Sling Blade quote #18:
    Karl Childers: Some folks call it Hell, I call it Hades.
    Norco, CA WX: 59.7øF, 77.0% humidity, 4 mph WNW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thu Oct 23 07:22:05 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:22 pm

    I don't recall avatars.js being designed to run via jsexec. Although it might, that's not really the intention - you run it as a timed event.

    Does jsexec run js scripts differently than how they're run as a timed event? Sometimes I've written js scripts that I intend to run as a timed event, and to test them, I'd run them with jsexec.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Thu Oct 23 10:10:09 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Nightfox to Digital Man on Thu Oct 23 2025 07:22 am

    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:22 pm

    I don't recall avatars.js being designed to run via jsexec. Although it might, that's not really the intention - you run it as a timed event.

    Does jsexec run js scripts differently than how they're run as a timed event?

    Yes - there's no console or bbs object and many of the global I/O functions behave somewhat differently when run in jsexec.

    Sometimes I've written js scripts that I intend to run as a timed
    event, and to test them, I'd run them with jsexec.

    I do too and usually that works, but its easy to make a script that doesn't work (or look) the same when run in JSexec.
    --
    digital man (rob)

    Synchronet "Real Fact" #46:
    Synchronet External X/Y/ZMODEM protocol driver (SEXYZ) was introduced in 2005 Norco, CA WX: 61.2øF, 78.0% humidity, 3 mph SW wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thu Oct 23 10:40:16 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Nightfox on Thu Oct 23 2025 10:10 am

    Does jsexec run js scripts differently than how they're run as a timed
    event?

    Yes - there's no console or bbs object and many of the global I/O functions behave somewhat differently when run in jsexec.

    Ah, I was pretty sure there's no console object when run with jsexec.. Is there a console object when run as a timed event?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Thu Oct 23 11:55:42 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Nightfox to Digital Man on Thu Oct 23 2025 10:40 am

    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Nightfox on Thu Oct 23 2025 10:10 am

    Does jsexec run js scripts differently than how they're run as a timed
    event?

    Yes - there's no console or bbs object and many of the global I/O functions behave somewhat differently when run in jsexec.

    Ah, I was pretty sure there's no console object when run with jsexec.. Is there a console object when run as a timed event?

    There is a console and bbs object instatiated when a .js file is invoked within sbbs (timed event or otherwise), yes.
    --
    digital man (rob)

    Rush quote #85:
    All at once the clouds are parted; light streams down in bright unbroken beams Norco, CA WX: 65.9øF, 70.0% humidity, 2 mph WNW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Hm Derdoc@VERT/FUTURELD to Digital Man on Sat Oct 25 01:58:09 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:47 pm

    Yeah, I think I misunderstood it a bit when I posted this, probably still do, but on another level. In a nutshell it lookslike your text/avatars/ isn't really much more "saturated" than mine, I may be missing the zeus_ii one. Maybe the sharing
    level isn't too high and those .ini files are mostly 'private' avatars if you will not designed to be imported. At least
    t my current understanding. On the plus side, I did make a buttload of avatars and I think I shared them, I have more
    ...

    ---
    þ Synchronet þ \1g telnet://\1n\1!Gfutureland.today \1c https://\1n\1!Cblockbra.in\1n
  • From Digital Man@VERT to Hm Derdoc on Sat Oct 25 14:34:11 2025
    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Hm Derdoc to Digital Man on Sat Oct 25 2025 01:58 am

    Re: Shared avatar issues - corrupted JSON data in SYNCDATA sub?
    By: Digital Man to Hm Derdoc on Wed Oct 22 2025 09:47 pm

    Yeah, I think I misunderstood it a bit when I posted this, probably still do, but on another level. In a nutshell it lookslike your text/avatars/ isn't really much more "saturated" than mine, I may be missing the zeus_ii one.

    Maybe there's something wrong with your SYMCDATA message base. All those JS/JSON errors you posted indicate you have an issue. Did you resolve that issue?

    Maybe the sharing
    level isn't too high and those .ini files are mostly 'private' avatars if you will not designed to be imported. At least
    t my current understanding. On the plus side, I did make a buttload of avatars and I think I shared them, I have more

    Cool.

    You probably want to fix your QWKnet tagline too:
    þ Synchronet þ \1g telnet://\1n\1!Gfutureland.today \1c https://\1n\1!Cblockbra.in\1n
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #73:
    SIGHUP = Hangup signal sent to a process when its controlling terminal is closed
    Norco, CA WX: 71.3øF, 70.0% humidity, 3 mph WSW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net