What can cause a display bug on different devices in a meteor web app and only once bundled - deployment

My problem is that my content does not show at all on particular device/browser and only once bundled. The wep app display correctly in debug (running it from meteor) whatever the device or browser are.
EDIT : I can see the navbar and the footer but not the yield on affected devices/browsers
Affected devices/browser known to date are Chrome on Nexus 4 (not on Note3) and Dolphin on Note 3.
Dev environment is Windows and prod is Linux.
I've also tried to run the app through meteor directly on server and the problem is not here but is back even when I bundle the app from the server.
Any idea about what can cause that and/or how to troubleshoot that?
EDIT 2
I can finally confirm that it's a client side bug.
Here is the error from chrome console on the device
Exception from Deps recompute function: ReferenceError: Lists is not defined
at Object.Template.layout.helpers.lists (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:31:25567)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:5624
at Object.e.call (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:20793)
at HTML.DIV.HTML.UL.UI.Each.UI.block.e [as __sequence] (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:28178)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:4102
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:9:3419
at a (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:4791)
at n.extend._compute (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5846)
at new e.Computation (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5183)
at Object.n.extend.autorun (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:7042)
But the Lists collection is defined, published and subscribed. And the weirdest part is that everything works well when debugging through Meteor

In my specific case, Collections definitions were located in a /collections folder at the root of the app. That caused the app to load them after the /client folder but only once deployed and on some devices/browsers only!
To fix that, I've just move the /collections folder into /lib, bundled it again, push it to the server and everything now works flawlessly whatever the device/browser is.

Related

Flutter Windows Desktop app gets stuck on white screen after msix installation

Background
I just developed my first flutter desktop app for a windows machine. The app is working fine while developing/debugging it, but I am trying to test it as an application in release mode.
What’s done
I created an msix using pub msix.
For signing, I have tried both my
own certificate and the test certificate that comes with msix
packages by default.
I have tried both stable and beta channels.
Actual Problem
When I install the app on the other system (or even on the actual system where I debugged the app). I can install the msix setup successfully I can see my app listed in the apps, but when I try to open it, it is stuck on a blank/white screen. There is no UI rendered. And if I try to maximize the window, it goes to App not responding state.
Any help will be really appreciated.
Thanks in advance.
Update / New Finding
After going through the links provided by Yehuda Kremer and pulling my hair for a few days, I found the answer in this tweet
https://twitter.com/FilledStacks/status/1436280577439715338?s=20
So the main issue is that app is using some absolute paths that don't work on other machines (after release)
1- My app was using a database, so I have made sure that that database path is relative to the application document directory.
2- Now the build is also referring to some dependencies and their paths are also absolute. I have noticed a flag CMAKE_INSTALL_LOCAL_ONLY in the cmake_install.cmake but that flag is not being set anywhere.
Here is the log of flutter build windows -v
https://pastebin.com/LAeshUMY
-- Now I am looking for a proper way to convert all the paths to relative so that the build is ready for installation on different machines, instead of local installation only.
I have found the solution.
The main problem was that the app was looking for some dependencies and it was unable to find them. As mentioned here.
The reason for not finding that in release mode can be one of the following,
You are using some dll (package that depends on a dll) that is available on a specific path in your system, but when you are release the app that (absolute) path is not valid anymore.
You are adding some asset with absolute path (that is only applicable to your system).
Solution:
If it is a dll, you should be adding that to the release folder. In my case it was sqlite3.dll
If it is some other asset then you should always use the relative path.
You mentioned msix package, let see if the problem is in the app or in the packaging process
run flutter build windows without the flutter pub run msix:create, then run the created .exe file to see if its work.
btw this issue mention here: https://github.com/flutter/flutter/issues/74507
and here (the 'maximizing' problem): Black screen appears on maximizing and minimizing flutter desktop app

Unity-WebGL showing grey window instead of interactive website

I have a Unity project, where you can navigate around in a 3D space environment. I'm using Unity version 2020.3.4f1 Personal. I went to 'Build settings', chose WebGL, and then clicked 'Build And Run.
The project seems to launch on a Chrome browser in localhost, without any issues:
However, when I zip the build files & folders (index.html file along with the 'Build' and 'StreamingAssets'), then host as a website, all I get is a grey screen, instead of an interactive website!
As mentioned the build created is - index.html file, 'Build' folder, and 'StreamingAssets' folder:
Clearly, there's something wrong with the build as the project seems to run fine directly in localhost.
Any help would be really appreciated.
Many thanks
Edit
Looking at the logs in the Chrome browser console (running on localhost), these are the logs:
For the 404 error, I found some Unity forum thread: https://forum.unity.com/threads/webgl-builds-only-partially-working.357591/ , where I then thought the solution was to enable Data Caching & Decompression Fallback, and set Compression Format Gzip.
But this didn't solve the issue, as I still get the 404 in the console log, running on localhost (although as mentioned before, in localhost it runs). Also, when hosting it on a server using Netlify it still shows just a Grey window.
Note: strangely when I refresh the browser running localhost, the 404 disappears, but still the main thing is that when hosted on a remote server (Netlify), I just get a Grey window.
Localhost will be case-insensitive on Windows, while Linux is usually case sensitive on the Host. Check URLs and file names, and try looking at the Web server logs for 404 errors.

getting error message "Failed to load resource: the server responded with a status of 404 (Not Found)"

I have a simple MVC web application, which was running locally without problems 3 weeks ago.
When I now open the application in Netbeans and run it, everything seems to work fine as well. However, when I go to the browser (in my case google chrome) to look at the app's frontend (at http://localhost:8080/optimizer), I get the following error message:
HTTP Status 404 - Not Found
In Chrome's javascript console the following error message is given:
optimizer:1 Failed to load resource: the server responded with a status of 404 (Not Found)
"optimizer" is the name of the app. (What's the point of the "1" in "optimizer:1"? ... I don't get this either.)
The server (payara) is running:
I can also reach the server's admin page:
However, somehow the server cannot seem to find the application, although 3 weeks ago everything worked fine ... I just don't get it.
What's wrong? How can I fix this?
UPDATE:
Clicking on "List Deployed Applications" in Payara's Admin Console reveals that my app is not(!) deployed.
I tried to deploy it by clicking on "Deploy an Application" -> "Choose file".
I selected the jar-file "optimizer-1.0-SNAPSHOT.jar", selected Type "EJB Jar", then clicked on OK.
I got this error message:
Archive type of /private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar was not recognized
How can I deploy my app? And why did it work automatically before and now it doesn't work any more?
UPDATE 2:
A difference I realise compared to before (3 weeks ago) is that the browser doesn't open automatically any more when I run the app.
Furthermore, Google Chrome used to be the IDE'S default browser ... now there is just a grey globe and I can no longer choose Chrome as my browser:
UPDATE 3:
I just noticed there is an error message that appears when the server is started (it's in the middle of hundred of rows of log output so I didn't notice it at first):
UPDATE 4:
-> NetBeans IDE 11.2
-> Payara Server 5.193
Error clearly shows, server is not able to recognize archive type of jar,
Archive type of
/private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar
was not recognized
From payara blog,
If you set “Location” by “Packaged File to Be Uploaded to the Server”,
the suitable type would be selected.
So, the suitable type would be selected automatically.
Also, optimizer-15075570634779987058.0-SNAPSHOT.jar is not an original jar optimizer-1.0-SNAPSHOT.jar
It seems that issue is with the path of an archive, from thread
Code in uploadFrame.jsf:
<sun:form id="form">
I probe to change it to:
<sun:form id="form" enctype="multipart/form-data">
in uploadFrame.jsf into console-common.jar file. And it works.
You can try with changing uploadFrame.jsf into console-common.jar file.
(Not sure if chrome takes care of this, as it was working for you with chrome).
You may also want to try manual deployment,
install-directory/bin/asadmin deploy PATH_TO_ARCHIEVE/optimizer-1.0-SNAPSHOT.jar
Ok, I now found out how to run the app locally without problems: by creating a .war file instead of a .jar file - now I can run the app again without problems.

How to package a PySide/Phonon app under Mac OSX?

I have a PySide/Phonon app (developed for and working flawlessly on Windows) that I need to "port" to Mac OSX - where I have no development experience whatsoever.
The app works as expected if I just run the Python file - the problems arise when I try to package it (which I need to do) with py2app.
If I leave the resulting .app as is, Phonon doesn't work, because it fails to load the required phonon_backend ; if I add the plugin path to qt.conf, as various sources suggest, Phonon seems to load (that is, I don't get the corresponding error message anymore), but I start getting the "so-and-so library is loaded twice, one will be used, which one is undefined" error, and the app crashes right away.
Finally, if I try to use the macdeploy_qt tool, I receive a message to the effect of "no external framework" and the results are functionally equivalent to what I get without using the tool, except there are a few more plugins in the relevant directory.
Any ideas/pointers/tutorials/etc? I'm using PySide1.1.1 for Qt4.7, by the way, and Python.org python binaries (otherwise py2app can't even start to build a standalone app, it seems).
I suggest you do it like in this tutorial.
Then you just have to add the following line somewhere at the top of your main module:
QApplication.setLibraryPaths([os.path.join(os.environ['_MEIPASS2'], 'qt4_plugins'), os.environ['_MEIPASS2'] ])
For PyInstaller >1.5 the following code should be used instead:
QApplication.setLibraryPaths([os.path.join(sys._MEIPASS, 'qt4_plugins'), sys._MEIPASS])

Eclipse 3.5 Cache Problem

I am using eclipse 3.5 with google app engine + spring framework to develop application. My problem is when I change the code and build the project, the new code doesn't come in to effect. I even deleted the old file but at runtime, the old version gets display in the browser. Why?
Your description is not explicit, so following are my assumptions:
You are changing jsp/js or view related files
You have Google app engine plugin for eclipse to deploy the code
Following might be one of the reasons:
Your view files are cached in the browser, so try deleting the browser cache
Google app engine might have cached your files, so try deleting the temp folder
Eclipse IDE wouldn't have deployed your changed code, so check the timestamp, if it still shows the old timestamp, then find out how to configure eclipse to detect your changes.
I found 3 workarounds for similar issue (changes to a servlet (.java file) were not taking effect).
Before editing the .java file, stop the application. It seems that if you edit it while running, the issue occurs, even if you edit it, stop then re-start.
Delete items in Temp folder e.g, (C:\Users\username\AppData\Local\Temp), then stop and re-start the app.
I think the culprit folder in the Temp folder is this:Jetty_127_0_0_1_8888_war__.g0qk00
Right click in in the console area and select 'Remove All Terminated'. Sometimes that reveals there are other instances running, which need to be stopped by clicking the terminate button.
I got the similar issue and the problem was due to not stopping the running server.
What i was doing was running the server, editing the java file, saving and again running the server. This created two instances of the server running and when checking into the browsers the old code was executed from the first instances.
So, the solution is terminate and relaunch the server, and your new changes will be in effect.