Giter Site home page Giter Site logo

screepsdotnet's Issues

Running into error on startup

Im currently trying to get your Basic Example running on a local private server. Sadly im running into an error when starting the dotnet runtime:

TypeError: Cannot read property 'location' of undefined

I removed the try/catch block to track it down.
It is saying that the issue is happening on line DotNet.createRuntime:13397:9

bug: Cannot read property 'ScreepsDotNet' of undefined

See attached:

image

This is a screenshot from Screeps Arena.

The offending line is this:

exports.ScreepsDotNet.Program.Init && exports.ScreepsDotNet.Program.Init();

I just cloned this repo, and ran dotnet publish -c Debug on the solution, and then referenced the arena folder from Screeps.

Bundler errors out when trying to read mono-config.json

I'm running on Linux, so that might be related, but I have all the mono packages installed.

Stack trace:

/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018: The "BundlerBuildTask" task failed unexpectedly. [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/user/repos/Screeps/bin/Release/net7.0/AppBundle/mono-config.json'. [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 u.nixCreateMode) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at System.IO.File.ReadAllText(String path, Encoding encoding) [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at ScreepsDotNet.Bundler.BundlerBuildTask.Execute() in E:\Development\VS2019 Projects\ScreepsDotNetGit\ScreepsDotNet.Bundler\BundlerBuildTask.cs:line 99 [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/user/repos/Screeps/Screeps.csproj]
/home/user/.cache/NuGetPackages/screepsdotnet.bundler/1.1.1/build/ScreepsDotNet.Bundler.targets(4,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/user/repos/Screeps/Screeps.csproj]

This happens when I include the ScreepsDotNet.Bundler package, the code in Program.cs has no impact. This builds successfully if I remove the package.

I could not find this mono-config.json even when it built without the package, I don't know where to get it from, or where it comes from.

Thank you for making this project, it took me a bit to find, but I was so happy when I did, since there is no documentation elsewhere on how to do this.

INIT: fatal error initialising runtime TypeError: self is undefined

I followed the quickstart guide and got my bundled code deployed on world (both simulation and real world). But when initializing the runtime, it gives the following issue and causes the initialization repeatedly triggered

[11:00:32 PM]
#1: INIT state refreshed, beginning init sequence
[11:00:32 PM]
#1 INIT: loaded js dependencies (0ms)
[11:00:32 PM]
DOTNET loaded 8 items from the manifest, totalling 5897 KiB of data
[11:00:32 PM]
DOTNET PROFILE decodeManifest 0 ms
[11:00:32 PM]
DOTNET PROFILE decodeManifest (b64) 0 ms
[11:00:32 PM]
DOTNET PROFILE decodeManifest (inflate) 0 ms
[11:00:32 PM]
DOTNET DEBUG: creating dotnet runtime...
[11:00:32 PM]
#1 INIT: fatal error initialising runtime TypeError: self is undefined
[11:00:32 PM]
#1 INIT: shutting down and starting again
[11:00:33 PM]
DOTNET PROFILE loop 0 ms
[11:00:34 PM]
DOTNET PROFILE loop 0 ms
[11:00:35 PM]
DOTNET PROFILE loop 0 ms
[11:00:36 PM]
DOTNET PROFILE loop 0 ms
...
And repeat the exact same output indefinitely.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.