Aller au contenu
Afficher dans l'application

Une meilleure façon de naviguer. En savoir plus.

Asterobot

Une application plein écran sur votre écran d'accueil avec notifications push, badges et plus encore.

Pour installer cette application sur iOS et iPadOS
  1. Appuyez sur Icône de partage dans Safari
  2. Faites défiler le menu et appuyez sur Ajouter à l'écran d'accueil.
  3. Appuyez sur Ajouter dans le coin supérieur droit.
Pour installer cette application sur Android
  1. Appuyez sur le menu à trois points (⋮) dans le coin supérieur droit du navigateur.
  2. Appuyez sur Ajouter à l'écran d'accueil ou Installer l'application.
  3. Confirmez en appuyant sur Installer.

Error messages

Every error text a script author can meet, grouped by where it appears, with its cause and how to fix it.

The error texts you can meet while writing and running scripts are grouped here by where they appear. Search for a part of the text you see. In the texts, a word in angle brackets such as <module> stands for something that changes: <module> is the path of a file inside Asterobot, such as library/my-first-script/1.0.0/index.js, <type> a message's name, <field> a field's name.

Where you see it What it looks like Section
At the top of the bot's page The behavior stopped with an error, with the full text, Copy and Dismiss The script stopped
A toast after Play, Run, a load or a version switch Couldn't start the behavior, Couldn't run the package, Couldn't load the selection or Couldn't switch version, without a reason When a package doesn't load
Package settings, on the bot's Settings tab, and the Add a bot dialog Couldn't read this package's settings, with the reason When a package doesn't load, and Declarations
Inside the script A rejected promise, or an error thrown by a call, that your code can catch Errors a script can catch
The bot's Console tab A warning or error line, while the script keeps running Console lines
Toasts on Package settings Couldn't apply the settings, Couldn't start the action, or an action's name followed by failed Saving settings and running actions
Under the package's manifest, after saving it The reason, or Couldn't save the manifest Saving the manifest

The script stopped

The behavior stopped with an error appears at the top of the bot's page when a script that had loaded stops because of an error, while starting or later. In Bot Manager, the bot's Behavior column says Failed. The game connection stays open. Fix the cause, then start the script again with Play, or with Run in the editor.

The beginning of the text says where the script was:

The text starts with The error happened
evaluate behavior module "<module>": In the top-level code of the modules, as the script started
read declarations of "<module>": While Asterobot read the parameters, actions, steps and conditions exports. See Declarations.
initialize behavior module "<module>": In the entry function, before it finished
Game traffic handler failed: In a handler registered with on() or onTraffic()
evaluate protocol handler selector: In a selector function passed to on()
evaluate protocol wait selector: In a selector function passed to wait()
parameters.onChange handler <number>: In a handler registered with onChange()
fight event handler failed: In a handler registered with onFight()
unhandled Promise rejection: Anywhere: a promise rejected and nothing caught it
drain JavaScript Promise jobs: In code that resumed after an await

What follows is the error itself:

  • Promise rejected: and the reason, when a promise the start was waiting for rejected.
  • An error thrown by your code: its type and message, such as TypeError: and the message. For an error thrown synchronously, at follows, with the function's name and, in parentheses, the file, the line and the column.
  • A message from one of Asterobot's functions, as listed in Errors a script can catch.

For example, a script that sends token instead of ticketKey while starting gets:

initialize behavior module "library/my-first-script/1.0.0/index.js": Promise rejected: IdentificationRequest.token: unknown protobuf field

These texts can appear after one of the beginnings above, or on their own:

Text Cause Fix
behavior module "<module>" has no unambiguous default export index.js has no default export Add export default async function behavior(launch)
behavior module "<module>" default export is not callable The default export isn't a function Export a function
behavior module "<module>" default export must be async and return a Promise The default export returned something other than a promise Make it an async function
dynamic import() is not supported by this Asterobot runtime The script called import() as a function Use an import statement at the top of the file
JavaScript execution deadline exceeded Code ran for more than 5 s without an await, as an endless loop does Look for a loop that never ends, and split long work into parts separated by an await, such as await sleep(0). See Limits.
the script fell too far behind the game: more than 8 MB of game messages are waiting for it, so this PC can't keep up with it The script's handlers take longer than the game's messages keep coming, minute after minute Keep handlers short, and move slow work out of them
game traffic lost: Asterobot fell behind the game and missed messages: <count> of them On a MITM bot, Asterobot itself fell so far behind the game that it had to skip messages, and the script would have missed them Run fewer bots on this PC, or play the script again
send <type>: <reason> A message the script sent couldn't be written, after send() had resolved Look at <reason>; play the script again
unhandled Promise rejection: <reason> A promise rejected with nothing to catch it: an await outside try/catch in an async handler or interceptor, or a promise started without await Wrap the await in try/catch, or add .catch()
Game session closed: <reason> The game connection closed while the script was running. The script handled every message that arrived before. Connect the bot again, then play the script
behavior requested Game disconnect The script called disconnect() Nothing, if that was intended

A script stopped with Stop shows no alert.

When a package doesn't load

When a script can't even be loaded, it never runs, and nothing reaches the Problems alert. The toast is all you get, without the reason: Couldn't start the behavior after Play, Couldn't run the package after Run, Couldn't load the selection after a load from the bot's menu, Couldn't switch version after changing the version.

To see the reason, open the bot's Settings tab. Asterobot loads a package the same way to read its settings, so for the bot's package, Package settings shows Couldn't read this package's settings with the text. The package's settings in the Add a bot dialog show it too. For a syntax error, the editor's error badge usually points at the line as well.

When the reason comes from the package's code, the text there starts with <package>@<version>: read declarations:.

Syntax and imports

Text Cause Fix
parse module "<module>": <details> That file has a syntax error Fix the syntax. Check the editor's error badge.
resolve "<specifier>" imported by "<module>": package "<package>" has no locked dependency for "<specifier>" An import names a package that isn't among the package's dependencies, or is misspelled Fix the name, or add the dependency. See Dependencies.
resolve "<specifier>" imported by "<module>": module "<module>" imported by "<module>" is not installed A relative import names a file the package doesn't have Fix the path. Relative imports need the whole file name, extension included, such as ./helper.js.
resolve "<specifier>" imported by "<module>": "<module>" imported by "<module>" is a data file, not a module A relative import names one of the package's fight profiles, a .json file of its fightprofiles folder Don't import it: Asterobot reads the package's profiles itself. A script plays one with setProfile() and its name.
resolve "<specifier>" imported by "<module>": relative import "<specifier>" escapes package root "<root>" A ../ goes above the package's own folder Import only files of the package, or of a dependency by its name
resolve "<specifier>" imported by "<module>": built-in module "<specifier>" is not registered The asterobot: module doesn't exist, which is the case for every asterobot:extension/ module today Import one of the twelve built-in modules. See Extension modules.
resolve "<specifier>" imported by "<module>": package "<package>": no installed version of "<name>" satisfies "<version>" An import such as "name@^2.0.0" asks for a version the script's packages don't include Lock a matching version in the dependencies
resolve "<specifier>" imported by "<module>": package "<package>": specifier "<specifier>" has an invalid version "<version>": <details> The part after @ in the import isn't latest, a version or a version range Fix the version
resolve "<specifier>" imported by "<module>": absolute module specifier "<specifier>" is forbidden An import starts with / Use a relative path or a package name
resolve "<specifier>" imported by "<module>": module specifier "<specifier>" contains a backslash An import path uses \ Use /
reachable module count exceeds limit 256 The script loads more than 256 modules See Limits
reachable module source exceeds limit of 4194304 bytes The script's modules weigh more than 4 MiB together See Limits
module graph depth <depth> exceeds limit 64 at "<module>" Imports chain more than 64 modules deep See Limits

Packages and dependencies

These texts start with resolve package <name>@<version>:, naming the package being loaded. A problem in one of its dependencies adds dependency "<name>" locked to version "<version>": before the reason, once per level.

Text Cause Fix
read package <name>@<version> sources: <details> Asterobot couldn't read that package's files, for example because that version isn't installed Install the package or the dependency at that version
package <name>@<version> is not installed: parse asterobot.json: <details> The package's asterobot.json isn't valid JSON Fix the file. See The manifest.
package "<name>@<version>": package "<name>" requires asterobot <range>, running <version> The package's compatibleVersion doesn't include the Asterobot version you run Update Asterobot, or change compatibleVersion. See Compatibility.
package "<name>@<version>": package "<name>" has an invalid compatibleVersion constraint "<range>": <details> compatibleVersion isn't a valid version range Fix it, such as >=1.5.0 <2.0.0
package "<name>@<version>": package source integrity mismatch The files of a package installed from the marketplace no longer match the checksum recorded at install Install that version again
package "<name>@<version>": empty package permission permissions in asterobot.json has an empty entry Remove it
package "<name>@<version>": duplicate package permission "<permission>" permissions lists the same permission twice Remove the duplicate
package "<name>@<version>": entry module "index.js" is missing The package has no index.js at its root Add it. See Package layout.
package "<name>@<version>": package contains no modules The package has no .js or .mjs file Add index.js
package "<name>@<version>" dependency "<specifier>" targets package named "<name>" version "<version>" A dependency whose name ends with @ and a version is locked to another version Make the version in the name and the locked version the same
package <name>@<version> has an invalid name: <details> The package's name breaks the naming rules See Names and versions

Messages about downloading or installing packages from the marketplace are covered in Package errors.

Errors a script can catch

The functions of the built-in modules report problems in two ways. Most return a promise that rejects, which await turns into an error a try/catch can catch. A few throw at once, as noted below.

String(error) gives the texts of this section as they are written here, with two exceptions: an error of type TypeError gives TypeError: followed by the text, and the errors thrown by record(), findPath(), proof(), memory.set() and packages.info(), and the errors move() rejects with, give GoError: followed by the text.

An error your code doesn't catch stops the script, with one of the texts in The script stopped.

Messages and timers

Text Returned by Cause Fix
protocol type must be a non-empty semantic message name send(), request() The message name is missing, empty or not a string Pass the name as a string
semantic protobuf message is not mapped: <type> send(), request() Asterobot has no message with that name Check the name in the Dofus protocol reference
protocol options must be an object send(), request(), wait() The options aren't an object, such as a bare number Pass { timeout: 5000 }
unknown protocol option "<name>" send(), request(), wait() The options have a key other than timeout, to and correlated Fix the key
timeout/milliseconds must be a finite positive Number send(), request(), wait(), sleep() A timeout that isn't a number above 0, or a sleep() duration that's negative or not a number Pass a number of milliseconds
timeout/milliseconds is too large send(), request(), wait(), sleep() A duration too big to be one Pass a smaller number
send option "to" must be "server" or "client" send() to isn't a string Use "server" or "client"
unknown send target "<value>": expected "server" or "client" send() to is another string Use "server" or "client"
send option "correlated" must be a boolean send() correlated isn't true or false Pass a boolean
send option "correlated" cannot be combined with to: "client": a frame toward the client is an event, which has no uid send() Both options were passed Drop one of them
protocol selector cannot be empty wait(); thrown by on(), intercept() The selector is "" Pass a name, "*" or a function
protocol selector must be a semantic type, '*', or predicate wait(); thrown by on(), intercept() The selector is neither a string nor a function Pass a name, "*" or a function
protocol.on handler must be callable, protocol.onTraffic handler must be callable, protocol.intercept handler must be callable Thrown as a TypeError The handler isn't a function Pass a function
maximum behavior handlers reached Thrown as a TypeError by on(), onTraffic(), intercept(), onChange() 256 handlers of that kind are registered Remove handlers you no longer need with off() or offChange()
protocol wait timed out wait() Nothing matched before the timeout Check the selector, or wait longer
context deadline exceeded request() No response came back before the timeout. Most Dofus requests never get one. Use send() and then wait() for the event the game sends
mitm relay refuses to identify: this Game session was already authenticated by the real DOFUS client request() The script sent IdentificationRequest on a MITM bot Identify only when launch.reason === "initial"
behavior resource limit exceeded: maximum pending operations reached send(), request(), table(), find(), search(), query(), move() 32 operations are pending Await operations before starting more
behavior resource limit exceeded: maximum waits reached wait() 128 waits are open Give every wait() a timeout
behavior resource limit exceeded: maximum timers reached sleep() 128 sleeps are pending Await sleeps instead of starting many at once

On a MITM bot, send() of an IdentificationRequest to the server doesn't reject: see Console lines.

Payload errors

send() and request() reject with these texts when a payload doesn't fit its message. An interceptor's { payload } gives the same texts on the bot's console, after build replacement payload for <type>:.

Each text starts with the path of the field: the message's name, then the field names separated by dots, with [<index>] for an item of a list and ["<key>"] for a value of a map.

Text Cause Fix
<type>: expected an object The payload is missing, null or undefined Pass {} for a message without fields
<path>: expected an object, got <type> The payload, or a nested message, isn't an object Pass an object
<path>.<field>: unknown protobuf field The message has no such field Check the field names in the Dofus protocol reference
IdentificationRequest.token: unknown protobuf field The script copies an old example that sends token and lang Send ticketKey and languageCode, as in Identify and run
<path>: fields "<name>" and "<name>" address the same protobuf field The same field is given under both spellings, such as ticketKey and ticket_key Keep one
<path>: oneof <group> selects both "<field>" and "<field>" Two alternatives of the same group are set Set only one
<path>.<field>: explicit undefined is not a protobuf value A field is set to undefined Leave the field out
<path>.<field>: null is only valid for a message field A field that isn't a nested message is set to null Leave the field out
<path>: expected an array A list field got something other than an array Pass an array
<path>: invalid array length The value passed for a list has an unusable length Pass a real array
<path>: expected a plain object map A map field got something other than an object Pass an object
<path>: invalid boolean map key "<key>", and the same with int32, uint32, int64 or uint64 A map key can't be read as the map's key type Use keys such as "true" or "12"
<path>: expected boolean A boolean field got another type Pass true or false
<path>: expected string A string field got another type Pass a string
<path>: expected Uint8Array or ArrayBuffer A bytes field got another type Pass a Uint8Array
<path>: expected integral Number A 32-bit integer field got a fraction or something that isn't a number Pass a whole number
<path>: Number is outside int32 range The number doesn't fit a signed 32-bit integer Pass a smaller number
<path>: expected integral Number in uint32 range An unsigned 32-bit field got a fraction, a negative number or something too big Pass a whole number from 0 to 4294967295
<path>: expected signed 64-bit BigInt or decimal string A 64-bit integer field got a number too big to be exact, a fraction, a string that isn't digits, or another type Pass a BigInt, such as 123456789012n
<path>: expected unsigned 64-bit BigInt or decimal string The same, for an unsigned field, or a negative value Pass a positive BigInt
<path>: expected Number A floating point field got something that isn't a number Pass a number
<path>: unknown enum symbol "<name>" The enum has no value with that name Check the value names in the Dofus protocol reference
<path>: expected enum symbol or number An enum field got neither a name nor a whole number Pass the value's name as a string

Game data

Text Returned by Cause Fix
gamedata.text key must be a string or integer Thrown as a TypeError by text() The key is a fraction, a number outside the 32-bit range, a BigInt, undefined or an object Check the value before passing it
gamedata.record table must be a non-empty string Thrown as a TypeError by record() The table name is missing or empty Pass the table's name
gamedata.record id must be an integer Thrown as a TypeError by record() The id isn't a whole number, is too big, or is a BigInt or a string Pass a regular whole number
datacenter: no such table: "<table>" Thrown by record(); table(), find(), search() This game version has no table with that name Check the table's name in the Game page's game data
gamedata.table name must be a non-empty string table() The name is missing or empty Pass the table's name
gamedata.find table must be a non-empty string find() The name is missing or empty Pass the table's name
gamedata.find filter must be a non-empty object find() The filter is missing, empty, an array or not an object Pass { column: value }
datacenter: no such column: table "<table>" has no column "<column>" find() A filter column doesn't exist in that table Fix the column's name
gamedata.search query must be a non-empty string search() The query is missing or empty Pass a name
gamedata.search options.table must be a string search() options.table isn't a string Pass the table's name as a string
datacenter: no text for this language: "<language>" search() The game data has no names in the script's language Extract the game data again, or check session.language
gamedata.query sql must be a non-empty string query() The SQL is missing or empty Pass the SQL as a string
gamedata.query params must be an array query() params isn't an array Pass an array, such as [31]
datacenter: empty query query() The SQL holds only spaces Pass a statement
datacenter: query is <size> bytes, over the 65536 byte limit query() The SQL text is too long Shorten the query
datacenter: followed by the database's message query() The SQL is wrong, names a table or column that doesn't exist, or writes, in which case the message mentions attempt to write a readonly database Fix the query. Try it in the SQL tab.

Pathfinding

Text Returned by Cause Fix
pathfinding.findPath mapId must be an integer Number, BigInt or decimal string Thrown as a TypeError by findPath() The map id is a fraction, a number above Number.MAX_SAFE_INTEGER, a string that isn't digits, or another type Pass currentMap().mapId, or the id as a BigInt
pathfinding.findPath from must be an integer cell id, and the same with to Thrown as a TypeError by findPath() The cell isn't a whole number, or is a BigInt or a string Pass a cell id from 0 to 559
pathfinding.findPath options must be an object Thrown as a TypeError by findPath() The options are neither an object, null nor undefined Pass an object, or nothing
pathfinding.findPath options has no property "<name>" Thrown as a TypeError by findPath() The options have a key other than occupied, cautious and disableDiagonals Fix the key
pathfinding.findPath options.occupied must be an array of cell ids Thrown as a TypeError by findPath() occupied isn't an array Pass an array of cell ids
pathfinding.findPath options.occupied[<index>] must be an integer cell id Thrown as a TypeError by findPath() That item isn't a whole number Pass cell ids only
pathfinding.findPath options.cautious must be a boolean, and the same with disableDiagonals Thrown as a TypeError by findPath() The option isn't a boolean Pass true or false
pathfinding.findPath: map <mapId>, cell <from> to cell <to>: pathfinding: not a map cell, cell ids go from 0 to 559: <cell> Thrown as a TypeError by findPath() from or to is outside 0 to 559. For a cell of occupied, the text ends with occupied cell <cell>. Pass cell ids from 0 to 559
failed to load map <mapId> for pathfinding: datacenter: no such record: maps/<mapId> Thrown by findPath() The bot's game version has no map with that id Check the map id
failed to open the datacenter: followed by the reason Thrown by findPath() Asterobot can't read the game data of the bot's game version Extract the game data
pathfinding.cellToPoint cell must be an integer cell id, pathfinding.distance a must be an integer cell id and the same with b, pathfinding.direction from must be an integer cell id and the same with to Thrown as a TypeError by cellToPoint(), distance(), direction() The cell isn't a whole number, or is a BigInt or a string Pass a cell id from 0 to 559
pathfinding: not a map cell, cell ids go from 0 to 559, after pathfinding.cellToPoint cell:, pathfinding.distance cells: or pathfinding.direction cells: Thrown as a TypeError by cellToPoint(), distance(), direction() A cell is outside 0 to 559 Pass cell ids from 0 to 559
pathfinding.pointToCell x and y must be integers Thrown as a TypeError by pointToCell() x or y isn't a whole number Pass whole numbers

Movement

Text Returned by Cause Fix
movement.move cell must be an integer cell id, movement.changeMap options.cell must be an integer cell id move(), changeMap(), as a TypeError The cell isn't a whole number, or is a BigInt or a string Pass a cell id from 0 to 559
movement.move cell: pathfinding: not a map cell, cell ids go from 0 to 559, and the same after movement.changeMap options.cell: move(), changeMap(), as a TypeError The cell is outside 0 to 559 Pass a cell id from 0 to 559
movement.changeMap side must be "top", "bottom", "left" or "right" changeMap(), as a TypeError The side is none of the four Pass one of the four
movement.useElement element must be an integer element id useElement(), as a TypeError The element id isn't a whole number Pass an id from currentMap().elements
movement.useElement options.skill must be an integer skill id useElement(), as a TypeError The skill isn't a whole number Pass a skill id from the element's skills
movement.travel mapId must be an integer Number, BigInt or decimal string, and the same for movement.route travel(), route(), as a TypeError The map id isn't a whole number Pass a map id, such as currentMap().id
movement.travel options.cell must be an integer cell id, movement.travel options.cell: pathfinding: not a map cell, cell ids go from 0 to 559, and the same for movement.route travel(), route(), as a TypeError The cell isn't a cell id Pass a cell id from 0 to 559
movement.travel options.risky must be a boolean, and the same for the other functions that take it travel(), route(), the map finders, as a TypeError risky isn't a boolean Pass true or false
movement.travel options.onLeg must be a function travel(), as a TypeError onLeg isn't a function Pass a function
movement.findMaps query must be an object, movement.findMaps query.<name> must be an integer findMaps(), nearestWith(), as a TypeError The query isn't an object, or a field isn't a whole number Pass { subArea: 95 } and the like
movement.mapAt x and y must be integers, movement.mapAt worldMap must be an integer mapAt(), as a TypeError A coordinate isn't a whole number Pass whole numbers
movement.nearest mapIds must be an array of map ids nearest(), as a TypeError mapIds isn't an array Pass an array, such as findMaps()'s
movement.mapsWithin legs must be a whole number of legs mapsWithin(), as a TypeError legs isn't a whole number from 0 Pass a number of legs
movement.<function> options must be an object every movement function, as a TypeError The options are neither an object, null nor undefined Pass an object, or nothing
movement.<function> options has no property "<name>" every movement function, as a TypeError The options have a key the function doesn't take Fix the key
movement.move options.cautious must be a boolean move(), as a TypeError cautious isn't a boolean Pass true or false
movement.<function> options.timeout: timeout/milliseconds must be a finite positive Number every movement function, as a TypeError timeout isn't a number above 0 Pass a number of milliseconds
move: the bot isn't connected to a game server move(), changeMap(), useElement(), travel() The bot has no game connection Connect the bot first
move: this bot has no game data to route on move(), changeMap(), useElement(), travel() The bot's game version has no game data Extract the game data
move: the character is already moving; await the walk, map change or use in progress first move(), changeMap(), useElement(), travel() Another walk, map change or use of the bot is under way, from a script or from Asteroboard Await each call before starting the next
move: the character is still walking move(), changeMap(), useElement(), travel() The character hasn't finished a walk it didn't ask for, such as one the player started on a MITM bot Wait for that walk to end
move: the character's map and cell aren't known yet move(), changeMap(), useElement(), travel() Asterobot hasn't seen the character's map yet, or where the map places the character Wait until the character is on a loaded map
move: the game has no path from cell <cell> to cell <cell> move(), changeMap(), useElement() The Dofus client itself would find no route Pick another cell
move: the server didn't grant the walk in time move(), changeMap(), useElement(), travel() Neither MapMovementEvent nor MapMovementRefusedEvent answered the walk within the timeout Check the cell, or give the server longer with timeout
move: another walk of the character started before this one ended move(), changeMap(), useElement(), travel() Another walk of the character started first, or the walk was cancelled Nothing to fix in the call
move: the server didn't acknowledge the end of the walk in time move(), changeMap(), useElement(), travel() No MapMovementConfirmResponse came within the walk's time plus the timeout. On a MITM bot the timeout counts from Asterobot's own confirmation, one second past the walk's time, when the Dofus client hasn't confirmed by then Give the server longer with timeout
move: the game session closed during the walk move(), changeMap(), useElement(), travel() The game connection closed first Connect the bot again
move: the walk didn't end on the cell it was for: it ended on cell <cell>, not on cell <cell> changeMap(), useElement() The server granted a shorter walk, so the character isn't on the exit Call again
move: the map data names no map beyond that side changeMap() That side leads nowhere Pick another side
move: no exit leads off that side of the map changeMap() That edge has no exit cell Pick another side
move: that cell isn't an exit of that side: cell <cell> changeMap() options.cell isn't one of that side's exits Pass an exit of that side, or no cell
move: no exit of that side can be walked to from here (cell <cell>) changeMap() Every exit of that side is out of the character's reach Walk elsewhere first, or pick another side
move: the server didn't change map in time; the character is still on map <mapId> changeMap(), useElement() Neither MapCurrentEvent nor MapCurrentInstanceEvent came within the timeout Give the server longer with timeout
move: the server refused the map change; the character is still on map <mapId> changeMap(), travel() The server answered MapChangeRequest with MapMovementRefusedEvent; a trip goes another way Leave by another side, or another exit cell
move: the character changed map, but the new map's contents never came changeMap(), useElement(), travel() No MapComplementaryInformationEvent came within 20 seconds of the new map, although MapInformationRequest was sent Check the bot's connection
move: the server refused the walk move(), changeMap(), useElement(), travel() The server answered the walk with MapMovementRefusedEvent Pick another cell
move: the character is still using an element useElement() A timed use of the character's hasn't ended Wait for the use to end
move: no such interactive element on this map: <element> useElement() The element isn't in currentMap().elements Pass an element of the character's map
move: the game data doesn't place this element on the map: <element> useElement() The map data has no cell for that element Nothing to fix in the call
move: the element offers no action right now: element <element> useElement() The element offers nothing now, such as a resource already harvested Wait for it to offer an action
move: the element doesn't offer that action right now: skill <skill>; it offers skills <skill>, <skill> useElement() options.skill isn't among the element's actions now Pass one of the skills it offers
move: the element offers several actions; name the one to use: skills <skill>, <skill> useElement() The element offers several actions and no skill was named Pass options.skill
move: the server refused the use (element <element>) useElement() The server answered with InteractiveUseErrorEvent Check the element can be used by this character
move: the server didn't answer the use in time (element <element>) useElement() No InteractiveUsedEvent came within the timeout Give the server longer with timeout
travel: the world graph doesn't have this map: map <mapId> travel(), route(), mapsWithin() The trip goes to a map the travel graph doesn't have, such as a house, a haven bag or an instance, or route() starts from one Pick a map of the world, or leave that map first
travel: no known way there (map <mapId> to map <mapId>) travel(), route() No way the trip may take leads there: it needs a zaap, an NPC transport, or a leg whose condition Asterobot can't check Get closer first, or pass risky: true
move: too many legs of the trip were refused; the last one: followed by the reason travel() The server or the map refused 8 legs of the trip: no exit or path to walk to, an element missing or offering another action, a use refused, or no map change. A trip goes round each one until then. Check the reason, or travel in steps
move: the trip keeps ending up off its route: on map <mapId> travel() 8 legs left the character somewhere their route didn't lead Travel in steps
move: the trip was stopped travel() stopTravel(), Asteroboard's Stop, or onLeg returning false stopped it Nothing to fix
move: nothing leads off this map to a map the world graph has (map <mapId>) travel() The character stands on a map the travel graph doesn't have, and none of its exits, sides or doors that leave worked Leave that map first

asterobot:movement describes each case.

Verification

Text Returned by Cause Fix
verification.proof challenge must be a decimal string, or undefined when the server sent none Thrown as a TypeError by proof() The challenge is neither a string, undefined nor null Pass traffic.payload?.value of the ServerChallengeEvent
verification: the challenge is not a decimal integer: "<challenge>" Thrown by proof() The challenge isn't a whole number written in base 10 Pass the challenge exactly as it arrived

asterobot:verification describes both.

Bot memory

These are thrown at once: the functions of memory are synchronous. Each text after memory.set starts with where the value is wrong, from value, as in memory.set value.fields[2] is not a finite number.

Text Thrown by Cause Fix
memory.get key must be a non-empty string, and the same with memory.set and memory.delete A TypeError The key is missing, empty or not a string Pass the key as a string
memory: a key must be a non-empty string of at most 256 bytes A TypeError from memory.set() The key is longer than 256 bytes Use a shorter key
memory.set <path> is undefined, which the memory cannot hold: use memory.delete to remove a key A TypeError The value, or something in it, is undefined Leave the field out, or call memory.delete()
memory.set <path> is not a finite number A TypeError NaN, Infinity or -Infinity Store a finite number, or null
memory.set <path> is a Symbol, which is not plain data A TypeError A symbol Store a string instead
memory.set <path> is a <kind>, which is not plain data A TypeError A function, a Map, a Set, a Date or another built-in object Store its data: an array for a Map, a number from getTime() for a Date
memory.set <path> is an instance of a class, which is not plain data: store its fields in a plain object A TypeError An object made with new from a class of your own Copy its fields into a plain object
memory.set <path> nests more than 32 levels deep, or contains itself A TypeError Too many levels of arrays and objects, or an object that holds itself Flatten the value
memory: the value is larger than 64 KiB memory.set() The value is too large Store less, or split it under several keys
memory: this bot's memory is full (1024 keys or 1 MiB) memory.set() The bot holds 1024 keys, or the values would pass 1 MiB together memory.delete() what's no longer needed

Limits explains how a value's size is counted.

Character

These are thrown at once: the functions of asterobot:character are synchronous.

Text Thrown by Cause Fix
character.itemCount itemId must be an integer item id A TypeError from itemCount() The id isn't a whole number from -2147483648 to 2147483647, or isn't a number at all, such as a string or a BigInt Pass the item's id as a number
character.jobLevel jobId must be an integer job id A TypeError from jobLevel() The same for the job's id Pass the job's id as a number

character() never throws. asterobot:character describes both.

Fight

These are thrown at once: the functions of asterobot:fight are synchronous.

Text Thrown by Cause Fix
fight.setProfile: fight: malformed profile: <field>: <reason> A TypeError from setProfile() The profile object can't be played Fix the field. The format's errors list each reason.
fight.setProfile: fightprofiles: no profile has this name: "<name>" setProfile() No profile has that name Check the name on the Fight Profiles page
fight.setProfile takes a profile's name or a profile object A TypeError from setProfile() The argument is neither a string nor an object Pass a name or an object
fight.setSpeed: fight: the speed must be slow, normal, turbo or custom, not "<speed>" A TypeError from setSpeed() Another speed Pass "slow", "normal", "turbo" or a timing object
fight.setSpeed: fight: a custom speed needs its timing, each wait from 0 to 60000 ms A TypeError from setSpeed() "custom" passed as a string, or a wait out of bounds (, not <ms>) Pass a timing object, each wait from 0 to 60000
fight.setSpeed: json: unknown field "<field>" A TypeError from setSpeed() A field a timing doesn't have Use actions, placement, ready, move, cast, endTurn and answerAtOnce
fight.setSpeed takes "slow", "normal", "turbo" or a timing object A TypeError from setSpeed() The argument is neither a string nor an object Pass a speed's name or a timing object
fight.onFight handler must be callable, fight.onDecision handler must be callable A TypeError The handler isn't a function Pass a function

asterobot:fight describes them, and the console lines its hooks can cause.

Chat

say() and whisper() reject; the other functions of asterobot:chat throw at once.

Text Thrown by Cause Fix
chat.say channel "<name>" isn't a channel: write it as the protocol does, "SALES" for Trade A TypeError rejecting say() The channel name is unknown Pass a protocol name, such as "SALES" or "SEEK"
chat: <reason> say(), whisper() The message wasn't sent; the error's reason says why, such as "cooldown" or "missingItem" See say() and whisper()
chat.pause seconds must be a positive number A TypeError from pause() Seconds that are 0, negative, or not a number Pass seconds above 0, or none to pause until resume()
chat.setVariable value must be a string, a number or a boolean A TypeError from setVariable() An object, an array or a function as the value Pass text, a number or a boolean
chat.setParts: chat: invalid settings: "<part>" isn't a part: write ads, replies, triggers, commands or status A TypeError from setParts() An unknown part Name ads, replies, triggers, commands or status
chat.setProfiles[<i>]: chat: malformed profile: <field>: <why> A TypeError from setProfiles() A profile object Asterobot can't accept Fix the field it names
chat.setProfiles: chatprofiles: no profile has this name: "<name>" An Error from setProfiles() A name no profile has Pass a name the bot's Chat tab lists

asterobot:chat describes them all, and the console lines the guard writes.

Alarms

Text Thrown by Cause Fix
alarms.raise name must be a non-empty string A TypeError from raise() The name isn't a string, or is empty Pass the event's name: raise("cheapItem") raises script:cheapItem
alarms.raise text must be a string A TypeError from raise() The text is given and isn't a string Pass text, or leave it out
alarms.onAlarm handler must be callable A TypeError from onAlarm() The handler isn't a function Pass a function

asterobot:alarms describes them.

Packages and settings

Text Returned by Cause Fix
packages.info requires a module or package name Thrown as a TypeError by packages.info() The name is missing, empty or not a string Pass a package name
package "<name>" is not installed Thrown by packages.info() No package of the running script has that name, asterobot:parameters included Check the name. See asterobot:runtime.
package "<name>" is ambiguous across <count> locked versions Thrown by packages.info() The dependencies lock several versions of that package Nothing to fix in the call: the name can't pick one
parameters.onChange handler must be callable Thrown as a TypeError by onChange() The handler isn't a function Pass a function
'Set' on a dynamic object returned false Thrown as a TypeError by assigning to a property of values values is read-only Don't assign to values
Could not delete property "<name>" of a dynamic object Thrown as a TypeError by deleting a property of values values is read-only Don't delete from values

While the script stops

A call made while the script is stopping rejects, or throws, with the reason the script is stopping, and the promises still pending when it stops reject with that reason too. After Stop, the reason is behavior runtime closed. There's nothing to fix: the script is ending.

Console lines

These lines appear on the bot's Console tab. The script keeps running.

Line Level Cause Fix
Refused to forward a message that would re-authenticate a relayed session Warning On a MITM bot, the script sent IdentificationRequest to the server. Asterobot didn't forward it, and send() resolved anyway. Identify only when launch.reason === "initial", as in Identify and run
interceptor failed: <error> Error An interceptor threw, or ran for more than 5 s Fix the handler, and keep it quick
interceptor selector failed: <error> Error An interceptor's selector function threw Fix the selector
fight decision hook failed: <error>: the AI decides Warning A fight decision hook threw, or ran for more than 5 s Fix the hook, and keep it quick
fight decision hook answered <stage>: not an answer this stage takes: <shapes>: the AI decides Warning A hook answered an object of another shape Answer one of the stage's answers
fight decision hook returned a Promise, which counts as no answer: a hook answers synchronously, so it can't be async Warning An async hook, or one returning a promise. Said once per script. Make the hook a plain function that returns its answer
The script's decision can't be played: the fight module decides instead Warning The rules engine refused a hook's answer, for the reason that follows. Said once a turn. Answer an action the fighter can play
The fight module stops the script's actions: <reason> Info A list of actions stopped early Nothing: the module decides again, and asks the hooks
Nothing plays this fight unless the bot's script does: the server disconnects a character left idle for a few minutes Warning On a Full socket bot, the module is off for the fight, or doesn't play its kind Play the fight from the script, or have the module play it with enable() or setFights()
build replacement payload for <type>: <error> Error An interceptor returned a { payload } that doesn't fit the message. <error> is one of the payload errors. Fix the payload
re-encode <type>: <error> Error Asterobot couldn't rebuild the message with the new fields Return { payload } with the same message's fields
cannot replace the payload of <wire name>: this build has no name for it, so there is nothing to build a replacement from - use { raw } instead Error An interceptor returned { payload } for a message without a readable name Return { raw }, or leave that message alone

A line is written for each message on which an interceptor fails. When several interceptors fail on the same message, only the first failure is written, and the tenth if there are that many, ending with (10 times). An async interceptor whose promise rejects doesn't write a line here: it stops the script with unhandled Promise rejection: <error>.

Saving settings and running actions

These appear as toasts on Package settings, on the bot's Settings tab.

Toast Text under it Cause Fix
Couldn't apply the settings <name>: <reason> A value doesn't fit its declaration. The reasons are listed in Declarations. Nothing from the form is saved. Correct the value, then Apply again
Couldn't apply the settings package "<package>" declares no parameter "<name>" The form holds a setting the package doesn't declare any more Click Refresh, then apply again
Couldn't apply the settings package "<package>" is not part of this bot's behavior The bot's package changed since the form was loaded Click Refresh
Couldn't start the action <argument>: <reason> An argument doesn't fit its declaration Correct the value in the dialog
Couldn't start the action the running behavior declares no action "<action>" on package "<package>" The running script doesn't declare that action, for example because you added it in the editor without starting the script again Start the script again
Couldn't start the action no behavior is running on this bot The script isn't running Play the script first
The action's name followed by failed The error the action's run threw, or its promise's rejection reason The action failed. The script keeps running. Fix run

When the declarations themselves can't be read, Package settings shows Couldn't read this package's settings instead of the form: Declarations lists those texts.

Saving the manifest

When you save a package's asterobot.json from Asteroboard and Asterobot refuses it, the reason shows under the manifest, or Couldn't save the manifest when there's none. Dependencies explains how to declare them.

The first four texts below come after invalid package manifest:. The last three are checked first, for dependencies that have no URL, and come on their own.

Text Cause Fix
empty dependency specifier A dependency has no name Name the dependency
dependency "<specifier>": version embedded in its own specifier: not a valid exact version: <details> The version written after @ in the dependency's name isn't one exact version Write an exact version, such as name@1.2.0
dependency "<specifier>": version "<version>" conflicts with the version already in its own specifier The dependency's name holds one version and its version field another Make them the same, or remove one
dependency "<specifier>": invalid version "<version>": <details> The version isn't latest, a version or a version range Fix the version
dependency "<specifier>" locks version "<version>" in its specifier but declares "<version>" The version in the name and the declared version differ Make them the same
dependency "<specifier>" needs an exact version A dependency without a URL has no exact version Give an exact version
dependency "<specifier>" needs <name>@<version> installed, or a URL to fetch it from A dependency without a URL isn't installed at that version Install it, or give its asterobot.net URL

Compte

Navigation

Recherche

Recherche

Configurer les notifications push du navigateur

Chrome (Android)
  1. Appuyez sur l'icône de cadenas à côté de la barre d'adresse.
  2. Tap Autorisations → Notifications.
  3. Ajustez vos préférences.
Chrome (Desktop)
  1. Cliquez sur l'icône représentant un cadenas dans la barre d'adresse..
  2. Select Paramètres du site.
  3. Find Notifications et ajustez vos préférences.