foundryvtt / foundryvtt

Public issue tracking and documentation for Foundry Virtual Tabletop - software connecting RPG gamers in a shared multiplayer environment with an intuitive interface and powerful API.
https://foundryvtt.com/
198 stars 10 forks source link

Installation failed:_0x158af4[...0x31d0(...)] is not a function #3307

Closed aaclayton closed 3 years ago

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

In order to submit an effective bug report, please include the following information along with your issue description.

Environment Details

Please share the following basic details about your setup.

Issue Description

Please provide a description of your issue below. Including console error messages, screenshots or videos can be particularly helpful.

I can not install modules like Foundry VTT Macros, Foundry VTT Tables and many other. It shows the error below. image

aaclayton commented 3 years ago

Fixed by adding a more interpretable error message for this use case:

image

aaclayton commented 3 years ago

Originally in GitLab by @AlexBoer

Note that I get the same error when using the UI buttons to install modules or systems that link to Github. I'm assuming that the URLs given by clicking on buttons are not "invalid URLs".

aaclayton commented 3 years ago

Originally in GitLab by @fohswe

Which OS did you try on? I can reproduce by entering (manually) file://test/module.json on Windows 7

aaclayton commented 3 years ago

Originally in GitLab by @anathemamask

I could not reproduce this error pointing to an erroneous filepath, either with a URL or with a local file.

Instead i get the attached error. the same occurs with module.

image

aaclayton commented 3 years ago

Bug: Entering an invalid URL in the "Install module" manifest url entry (such as a local file path that does end with /module.json) throws an obfuscated server error.

A more user-friendly message might be needed for this use case. image

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

@AlexBoer Yes, I am in China and no, the servcer I host is in Los Angeles. The docker is also there. Since it works well I will not try to host in China.

aaclayton commented 3 years ago

Originally in GitLab by @AlexBoer

Works:

Dice So Nice! https://gitlab.com/riccisi/foundryvtt-dice-so-nice

One Journal https://gitlab.com/fvtt-modules-lab/one-journal

srd-hero-et-dragons https://gitlab.com/lemaire.erw/srd-heros-et-dragons

Does NOT Work:

MonsterBlocks https://github.com/zeel01/MonsterBlocks

RollTable Buttons https://github.com/RaySSharma/fvtt-rolltable-buttons

I'm going back to my previously mentioned GitHub theory.

I didn't say this before because I didn't want to assume anything, but is @soulwhisper living in China by chance?

I am currently in China and use a VPN to get around the great firewall. Though I get the same errors without the VPN turned on also.

I also tried manually downloading some modules from GitHub and entered the local path to the file in the Manifest URL, but got the same error.

For example, Manifest URL: file:///C:/Users/alex/Desktop/MonsterBlocks-master/

That gives the same error as in the above screenshot (the text editor seems to remove the final part of that URL that goes to the actual json file)

aaclayton commented 3 years ago

Can you share an example of:

  1. A module manifest that works?
  2. A module manifest that doesnt?
aaclayton commented 3 years ago

Originally in GitLab by @AlexBoer

So far anything hosted on Gitlab will install fine. But systems and modules hosted on github get this error.

EDIT: Spoke too soon. Not everything hosted on Gitlab will install.

aaclayton commented 3 years ago

Originally in GitLab by @AlexBoer

@aaclayton The error file is completely blank (0 KB, nothing in notepad). I've attached debug just in case that helps.image

aaclayton commented 3 years ago

Hmm, interesting. @AlexBoer could you share the file {userData}/Logs/error.log so that I could see perhaps more details about this error?

aaclayton commented 3 years ago

Originally in GitLab by @AlexBoer

I am having what seems like a similar issue. Any time I try to install anything I get the error in the attached image.

I am running Foundry VTT locally (fresh install, twice) on Windows 10. The same modules listed by Xiao Yang also will install for me (Dice So Nice!)

image

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

@aaclayton An Update of the Situation: I started a docker on my server using 'https://github.com/felddy/foundryvtt-docker'. Everything is fine withe the docker, no more errors. I will stack with the docker now.

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

@aaclayton Sure. UI works only if it has a worked URL. worked URL=https://gitlab.com/riccisi/foundryvtt-dice-so-nice/raw/master/module/module.json not-worked URL=https://raw.githubusercontent.com/foundry-vtt-community/macros/master/module.json

According to my friends' advice, this might be a rending bug similar to this one below. https://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined

aaclayton commented 3 years ago

I'll ask around Discord for a second opinion on this, it's not a problem that has been occuring for other users - so I'll need to find some more evidence that helps explain what is going wrong for you.

Do modules installed through the "Install Modules" UI work properly? Can you give an example of:

  1. A manifest URL that you are installing manually that DOES NOT work?
  2. A manifest URL that you are installing manually that DOES work?
aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

@aaclayton This bug persists on either Win 10 or Ubuntu 20. Manually installed modules will not be displayed in the world module settings neither.

P.S. console(F12) log provided for this error. It looks like something is missing at that line. image

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

I also tried the node.js version with Node.js 12.18.3 on Windows 10. The module installation of 'Foundry VTT Macros' failed again with same error.

Neither the manually installation nor 'usage without the module'(described on the github) worked.

I would try the Linux version on my workshop pc with other mods tomorrow.

aaclayton commented 3 years ago

Originally in GitLab by @soulwhisper

I made a clean uninstall (include all files related in appData). Then I reinstalled and tried again. The error is still there. Also, there are a few modules without such error like 'Dice so nice' and 'One journal'.

aaclayton commented 3 years ago

Hi @soulwhisper strange error you've encountered here. Could you perhaps try re-installing the Foundry software and see if the error persists after a clean reinstall?

aaclayton commented 3 years ago

made the issue visible to everyone