Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text tool not producing visible text #412

Closed
duncanch89 opened this issue Sep 17, 2024 · 13 comments
Closed

Text tool not producing visible text #412

duncanch89 opened this issue Sep 17, 2024 · 13 comments

Comments

@duncanch89
Copy link

duncanch89 commented Sep 17, 2024

The text tool does not work on my self-hosted version of this, but it works fine on other peoples' versions I've seen.

I used the latest docker image install method, it's running in a Debian 12 linux container in Proxmox.

Nothing useful in the logs from what I can see.

"asdfasdfasdfasdfasdf" - this is the text that I typed into the text box in the below screenshot. I was able to copy from the text box in the app, but no matter what I can't get it to become visible.

image

Here are the logs. As I said, nothing useful, I don't think.

`> [email protected] server

webpack serve --mode development --env development --open

[webpack-dev-server] Project is running at:
[webpack-dev-server] Loopback: http://localhost:8080/
[webpack-dev-server] On Your Network (IPv4): http://172.17.0.3:8080/
[webpack-dev-server] Content not from webpack is served from '/usr/src/app' directory
[webpack-dev-middleware] wait until bundle finished: /
[webpack-dev-middleware] wait until bundle finished: /
asset bundle.js 2.59 MiB [emitted] (name: main) 1 related asset
runtime modules 26.5 KiB 13 modules
orphan modules 15.9 KiB [orphan] 10 modules
modules by path ./src/js/ 1.26 MiB 218 modules
modules by path ./node_modules/ 724 KiB 47 modules
modules by path ./src/css/*.css 148 KiB
./src/css/reset.css 1.38 KiB [built] [code generated]
./src/css/utility.css 1.38 KiB [built] [code generated]
./src/css/component.css 1.39 KiB [built] [code generated]
./src/css/layout.css 1.38 KiB [built] [code generated]
./src/css/menu.css 1.38 KiB [built] [code generated]

  • 9 modules
    webpack 5.89.0 compiled successfully in 22808 ms`
@viliusle
Copy link
Owner

viliusle commented Sep 18, 2024

Can you do Menu > File > Open > open test template and add screenshot here?
Also maybe you have Font issues? Does changing font family helps?

@duncanch89
Copy link
Author

Thanks for the reply! The below screenshot has like 4 or 5 text boxes in it, all using different fonts, none of them are visible.

I also tried running it in a VM as opposed to a Linux Container, same issue.

image

@viliusle
Copy link
Owner

viliusle commented Sep 19, 2024

Very strange, it is hard to help. Even I am not a person who wrote text module, if other tools are working, text should work too.

Do you see "Hello World" here?
https://www.w3schools.com/graphics/tryit.asp?filename=trycanvas_filltext

Also check if examples here are working too: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text

It may be browser issue.

@duncanch89
Copy link
Author

duncanch89 commented Sep 19, 2024 via email

@viliusle
Copy link
Owner

I see errors on console:
11

@duncanch89
Copy link
Author

I see errors on console: 11

Any ideas? Does it seem like a permissions issue or something?

@duncanch89
Copy link
Author

I see errors on console: 11

I tried installing via the same method on an Amazon Lightsail instance and having the same issue. Could it be a Debian issue? I'm going to try in an Ubuntu LXC

@viliusle
Copy link
Owner

viliusle commented Sep 22, 2024

Looks like some conflict. Can you try without https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015 script? I see it in source code.

@duncanch89
Copy link
Author

Looks like some conflict. Can you try without https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015 script? I see it in source code.

I don't know how to do that, but I'll see if I can figure it out. Sorry, I'm used to Docker Compose, this project is the first time I've manually created a Dockerfile to build/run a container.

@duncanch89
Copy link
Author

The text tool works fine when I use the npm install method, which I could never get to work in debian. Now that I've switched to Ubuntu, I was able to install using that method.

@duncanch89
Copy link
Author

Okay, so I figured something out.

In order to make the app usable over a reverse proxy, I've been adding these two lines to webpack.config.js under "devServer:"

compress: true,
allowedHosts: 'all',

That section now looks like this:

        devServer: {
                // host: '0.0.0.0',
                //contentBase: "./",
                compress: true,
                allowedHosts: 'all',
                static: {
                        directory: path.resolve(__dirname, "./"),
                },
        }

If I don't add those lines, loading the webpage over reverse proxy results in a mostly blank page that only contains the text: "Invalid Host header".

But adding those lines is what breaks the text tool.

Here's my setup:

I am running minipaint on my local machine.
I am running Nginx on an AWS lightsail server.
I'm exposing my local IP addresses to that AWS server via tailscale.

Nothing changed when trying to run miniPaint on the AWS Lightsail system (rather than through the tailscale VPN).

@viliusle
Copy link
Owner

So problem solved?

@duncanch89
Copy link
Author

So problem solved?

I mean I guess so? The tool isn't any use to me if I can't use it over a reverse proxy, but that isn't your problem.

If you know how to get it working over a reverse proxy and maintain all functionality let me know, otherwise I'll look into what my alternatives are.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants