Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Blank Screen with NC 19.0 and Rainloop 7.0.1 #201

Closed
Pecadis opened this issue Jun 8, 2020 · 69 comments
Closed

Blank Screen with NC 19.0 and Rainloop 7.0.1 #201

Pecadis opened this issue Jun 8, 2020 · 69 comments
Labels

Comments

@Pecadis
Copy link

Pecadis commented Jun 8, 2020

Hi Alain,

first, i would like to thank you for your work. I am using Rainloop since Years and really appreciate your doing.
I have lately upgraded to 19.0 by accident and have seen that Rainloop just started showing a blank Screen when opening the App. Do you have an idea where this could come from?

I have seen that the Browser Console is refusing to execute some scripts because the Mime Type doesn't match.

image

However, even if i disable the header "X-Content-Type-Options" in nginx, it still doesn't work.
The Logs in RL itself seems to be fine and connecting to the Mailserver Properly as it should.

How can i support you to solve this issue?

Best Regards

@pierre-alain-b
Copy link
Owner

Which browser are you using?
Could you share a screenshot of what you see with Rainloop?
i understand that you say that you say that despite not being visible Rainloop is connecting appropriately to the mail server, right?

@twieskot
Copy link

twieskot commented Jun 8, 2020

The same for me, im using Firefox 77.0.1 (64-bit)

failure

@Pecadis
Copy link
Author

Pecadis commented Jun 8, 2020

I am using the Brave Browser(V1.9.76) but have also checked it with Firefox (77.0.1 (64-Bit) ) and Chrome (83.0.4103.97)

I am basically just seeing the following:
image

and yes, Rainloop seems to connect to the Mailserver in the Background (seen in the Logs) but is not displaying it in the Browser.

@fracarvic
Copy link

Same here. Tested with latest versions of Edge Chromium and Firefox.

Problem since upgrade to Nextcloud 19. I'm using official nextcloud docker image.

@nextgen-networks
Copy link
Contributor

@fracarvic
I've tested it couple of moments ago on my installed Edge (Chrome base 83.0.478.45) and Rainloop works without a hassle.
Very strange.
... do you have any extension installed and advanced/custom rules applied (uBlock Origin, ...)?

@twieskot
Copy link

twieskot commented Jun 8, 2020

uBlock origin (but disabling it doesn't have any effect)

@pierre-alain-b
Copy link
Owner

No issue here with ublock and FF 77d 64 bits. No warning either. Are you all serving Nextcloud with Nginx?

@Pecadis
Copy link
Author

Pecadis commented Jun 8, 2020 via email

@pierre-alain-b
Copy link
Owner

Can you check the MIME type of the file polyfill.js returned by the server?
image

@pierre-alain-b
Copy link
Owner

Anything special in your nginx config? Any change in the MIME type of some files?

@pierre-alain-b
Copy link
Owner

Also can you check if mime.types get loaded properly (check nginx logs) or if you get configuration errors (nginx -t)?

@Pecadis
Copy link
Author

Pecadis commented Jun 8, 2020

Polyfills list listed as text/html

nginx conf is working fine:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

I am using the default Nextcloud configuration. This is the Block which should affect the it

 # Adding the cache control header for js and css files
 # Make sure it is BELOW the PHP block
 location ~ \.(?:css|js|woff|svg|gif)$ {
   try_files $uri /index.php$uri$is_args$args;
   add_header Cache-Control "public, max-age=15778463";
   # Add headers to serve security related headers (It is intended to
   # have those duplicated to the ones above)
   # Before enabling Strict-Transport-Security headers please read into
   # this topic first.
   # add_header Strict-Transport-Security "max-age=15768000;           
   #  includeSubDomains; preload;";
   #
   # WARNING: Only add the preload option once you read about          
   # the consequences in https://hstspreload.org/. This option
   # will add the domain to a hardcoded list that is shipped
   # in all major browsers and getting removed from this list
   # could take several months.
   add_header X-Content-Type-Options nosniff;
   add_header X-XSS-Protection "1; mode=block";
   add_header X-Robots-Tag none;
   add_header X-Download-Options noopen;
   add_header X-Permitted-Cross-Domain-Policies none;
   # Optional: Don't log access to assets
   access_log off;
}

@fracarvic
Copy link

I'm using apache (with official nextcloud docker image) with default configuration, behind a nginx proxy (nginx-ingress, i'm using kubernetes) only with this config:

nginx.ingress.kubernetes.io/proxy-body-size: 512m 
nginx.ingress.kubernetes.io/configuration-snippet: |
  rewrite ^/.well-known/carddav https://$host/remote.php/dav/ redirect;
  rewrite ^/.well-known/caldav https://$host/remote.php/dav/ redirect;
  location /apps/rainloop/app/data { deny all; } 

Working perfectly with nextcloud 18 official docker image.

@fracarvic
Copy link

fracarvic commented Jun 8, 2020

I'm not using any extensions on browser. Tested on my mobile (chrome for android) and same problem, white screen.

@pierre-alain-b
Copy link
Owner

OK so I think it is quite clear that the issue comes from the hosting. I have the feeling that all people impacted have the Nexctloud 19 official docker image. Correct?

@Pecadis
Copy link
Author

Pecadis commented Jun 8, 2020 via email

@pierre-alain-b
Copy link
Owner

OK so maybe Nginx is the smallest common factor here...

@Pecadis
Copy link
Author

Pecadis commented Jun 8, 2020 via email

@twieskot
Copy link

twieskot commented Jun 8, 2020

i'm also working on a installation with docker+nginx

@samsalway
Copy link

docker + traefik, experiencing same problem, same browser logs about script mime type.

@twieskot
Copy link

twieskot commented Jun 9, 2020

Can you check the MIME type of the file polyfill.js returned by the server?
image

image

@pierre-alain-b
Copy link
Owner

So we need to understand why the server Nginx is sending this weird mime/type for js files! Do you have anything around mime types in your respective Nginx configs?

@Pecadis
Copy link
Author

Pecadis commented Jun 9, 2020

Looking around, there is nothing else than i have already posted in regards to nginx and mime type. Even in the default /etc/nginx/mime.types File, the JS files are referenced correctly

types {
    text/html                                        html htm shtml;
    text/css                                         css;
    text/xml                                         xml;
    image/gif                                        gif;
    image/jpeg                                       jpeg jpg;
    application/javascript                           js;
    application/atom+xml                             atom;
    application/rss+xml                              rss;

@pierre-alain-b
Copy link
Owner

and yet the server is serving them as text/html...

@fracarvic
Copy link

fracarvic commented Jun 10, 2020

I think the key here is the response code 302, a temporary redirection.

polifills.min.js returns a 302 redirection to /apps/files, and this response seems generated by nextcloud php, not apache or nginx.

More info, I'm using SSO with keycloak SAML.

@pierre-alain-b
Copy link
Owner

Indeed this is strange - we have something to follow!
Can you look at the detailed reponse of the packet and share what you see?
Clealry app/files shall be text/html so if there is a redirect by nextcoud to app/files then it is normal that this fails...

@pierre-alain-b
Copy link
Owner

Has anyone a public isntance where I could test the behavior as I cannot replicate it on my test and production instances?

@fracarvic
Copy link

ok, i think i find the problem.

I have two app folders, one for included apps and anoother for custom apps. In config.php:

  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),

Rainloop is installed in custom_apps and if I move to apps rainloop starts working perfectly.

@relikd
Copy link

relikd commented Jul 12, 2020

Haven't read through the whole topic but wanted to create an issue for the same bug.
My problem was (and still is) that I could not open the admin interface.

I figured the problem in my case. The generated html has links to static files that are not present on the server (404). But the URL is just slightly wrong. /apps/... instead of /extra-apps/...
Maybe its relevant that I have nextcloud installed via snap.

The WebStaticPath function seems to produce a wrong URL:
https://github.com/pierre-alain-b/rainloop-nextcloud/blob/master/app/rainloop/v/1.14.0/app/libraries/RainLoop/Utils.php#L596

It produces:

/apps/rainloop/app/rainloop/v/1.14.0/static/js/min/boot.min.js?community

instead of:

/extra-apps/rainloop/app/rainloop/v/1.14.0/static/js/min/boot.min.js?community

I have no idea whether other parts may have wrong URLs too, but fixing this single line above at least shows the admin interface.

@kyrofa
Copy link

kyrofa commented Jul 17, 2020

@bsherwoodofdaptiv FYI you don't need to be following the stable channel if you don't want to automatically update across major versions. Use sudo snap refresh nextcloud --channel=18 instead and you'll stay on v18 (minor version updates only) until you're ready to upgrade. See the snap release strategy page for more details. Also see what do I do if an update breaks Nextcloud.

@Griefed
Copy link

Griefed commented Jul 24, 2020

@waltherjj's Hack worked for me, too. Thank you very much!
Running Nextcloud with a docker-compose composed of NGINX and Let's Encrypt auto-certification

@Pit-Storm
Copy link

I have the same problem but not able to edit such files, because using a hosted instance on hetzners storage-share.
A few days ago it worked fine but since today it's only showing a blank screen.

Nextcloud 19.0.1
rainloop: 7.0.1

Is it possible that there will be a patch on appstore soon?

@pierre-alain-b
Copy link
Owner

Well, unfortunately for now, there is no simple hack identified (unless I missed something) that would work both for classical deploments and a custom apps path. Am I misunderstanding the situation here?

@bungyguy
Copy link

I have the same issue at Hetzner, cannot edit files because it is a managed instance.
Running on:
Nextcloud 19.0.1
rainloop: 7.0.1

I would be very good if you could adress the issue on the Nextcloud Marketplace for usage within the NC platform.

Kind regards!

@bungyguy
Copy link

Hi Pierre

Can you please change the compatibility in the NC Store to not compatible with NC19 then? Do you intend to release a working update or is the plugin for NC19 obsolete now?

Kind regards!

@pierre-alain-b
Copy link
Owner

In fact Rainloop is compatible with NC19, I have hundreds of users using it without issue. The issue only appears when one chooses to use a custom path for the apps folder.
It is not yet clear for me in which situation apps are deployed this way rather than the standard way. A clue anyone? Is this the standard behavior from now on?

@cvandesande
Copy link

It is not yet clear for me in which situation apps are deployed this way rather than the standard way

It's pretty standard if you are using the official Nextcloud docker image: https://github.com/nextcloud/docker which I suspect most of the "managed" Nextcloud providers are using in order to automate their upgrades and rollbacks.

The custom_apps setup is describe in the README.md towards the end

@Pecadis
Copy link
Author

Pecadis commented Aug 11, 2020

Yes, as far as i can see, the Custom apps folder makes sense, if you want to avoid problems when updating your NC instance and separate between the Official and Custom ones.

https://docs.nextcloud.com/server/19/admin_manual/apps_management.html#using-custom-app-directories

Wouldn't it make sense to throw away the conditional if and replace the path with the variables from the Documentation?
Something like this (Pseudocode)

get scriptpath // to know where rainloop is located
read the "app_paths" array and find the matching one
return the path with the appropriate url of the array.

Because with the current workaround, we are basically doing this step manually by replacing the default path "/apps/rainloop/app" with the custom one "/customapps/rainloop/app" which basically just overrides everything in the condition.

@bungyguy
Copy link

Hi Pierre

Can we expect a resolution for people with hosted instances who are not able to correct the code in the files directly?
The original app for mail is really poor compared to yours. However, on Hetzner and likely other magaged hosters, your plugin is rendered useless right now.

Do you have any intention to fix this? Because currently it does not look like it. This is marked as a bug for two months and nothing happens?

Why is there no reply to Pecadis' message? Custom App directories are common, well documented and compatible with pretty much every plugin - except yours!

@Pecadis
Copy link
Author

Pecadis commented Aug 13, 2020

@bungyguy no need to be personal on him. He is doing this by himself without any payback, so be kind or do something contructive

@pierre-alain-b
Copy link
Owner

pierre-alain-b commented Aug 13, 2020

@Pecadis and @cvandesande thank you for pointing out the context in which custom_apps are used, I understand now why the apps are placed in the custom folder. Your pseudocode makes absolute sense.

@bungyguy yes clearly your message is not helping, every minute I spend on this plugin is taken from:

  • paid activities
  • free time with my children

If you put forward a pull request to fix this, this would be of tremendous help and I pledge to review and accept it in very little time. That would be a better way forward and smarter than your message.

@bungyguy
Copy link

Hi Pierre

I did not want to be rude, sorry if thats the case. I really just wanted to know if a fix is coming or if the plugin is now obsolete on some hosted environments. A solution was proposed by Pecadis and others, but no reaction.

I am not a developer, so I cannot help with a pull request. However, I am more than happy to support the project financially, so let me know your paypal address and I will do whatever I can towards the project.

Anyways, thanks a lot for your work on the application!

@pierre-alain-b
Copy link
Owner

I have a fix to propose. I will publish 7.0.2 on the app store and you will tell me if this works. Then maybe we will be able to cheer and close this issue.

@pierre-alain-b
Copy link
Owner

And @bungyguy if it works and if you want to pay me a coffee or a beer, here you can go https://paypal.me/pierrealainb

@bungyguy
Copy link

Hi Pierre

Thank you so much for your efford on fixing this. I can confirm everything is smooth on Hetzner NC19 and RL 7.0.2.
Enjoy a few beer and coffee. ;-) Maybe you can put the paypal link on your website for others too?

Have a nice Weekend!

@eloo
Copy link

eloo commented Aug 14, 2020

Looks also good with hoellen/nextcloud 👍
Beer incoming!

Thanks

@Pecadis
Copy link
Author

Pecadis commented Aug 14, 2020

@pierre-alain-b it works on my instance as well. That seems to have solved the issue =)

@samsalway
Copy link

Working in Docker 👍

@pierre-alain-b
Copy link
Owner

Thank you everyone for helping understand the conditions in which the bug occurred, for reporting about it and for your patience!
And thanks to all who sent some support/beer/coffee/candies through Paypal, much appreciated!

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

No branches or pull requests