Wakanda data browser (V1) in V 2.4.0 - database

I've been using Wakanda since version 1. x and have been hesitating for a long time to test the newer versions because they no longer have a data browser. Now I have installed the latest version and installed a webfolder in the backend. Here I copied the complete WALIB directory and declared the Webfolder as active webfolder. Now I can use the URL "localhost: 8081/walib/dataBrowser/index. html" to access the Databrowser website, but 2 calls end with a 404 error:
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.js?path=WALIB"
and
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB"
It looks like the tilde is causing the problem.
How can I solve the problem, do I still have to make an adjustment somewhere?

#MyemaHMN has posted a solution that worked in this thread: Wakanda 2.2.1 Enterprise Server DataBrowser. Hope that helps.

The tilde does not seem to be the problem. In my solution I have the same call like:
http://127.0.0.1:8081/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB
and it is working.
I guess it is the issue is the /db/ directory in the link. Where does it come from? The walib-directory is expected to be immediately under the webfolder.
Check the directory structure and check the app.waProject in relation to that.

Related

How do I load the latest code in Cake REPL?

When I make changes to my Entity code, the changes only reflect after restarting the REPL console. How do I always have the latest code in my REPL console?
./bin/cake console
> $ac_table = Cake\Datasource\FactoryLocator::get('Table')->get('AccountChannels');
> $ac = $ac_table->find()->first()
> $ac->someFunc(); // I can only see changes to this function after restarting the console
I also tried to reload the entity with the first() call after a code change, but no luck.
CakePHP uses PsySH under the hood, and currently it doesn't support code reloading, unless you can get a runkit version with import support running in your PHP environment.
Hey there's an existing fork of runkit for php7. Unfortunatly the runkit_import function was removed in version 4.0.0a1, apparently because of bugs with php7.3+, so this will not work for latest versions of php, but it should be mostly ok for earlier versions (haven't fully tested though). To install:
pecl install runkit7-3.1.0a1
I created a PR to update RunkitReloader.php class
(nb: might not work for class props, see pr modifications)
https://github.com/bobthecow/psysh/issues/416#issuecomment-776631583
https://github.com/bobthecow/psysh/issues/416

The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs

This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.
This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to #angular-devkit
The issue I was facing is when I set the field bundleDependencies in angular.json to true . The Puppeteer cannot start with the error cannot launch the browser
Then I found it also happened on the other external libraries I'm using at the Server side like BullJS Bull-Board Puppeteer-Cluster with the below error
Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer
The solution is quite simple you just need to add externalDependencies below the field bundleDependencies, which are the libraries we are using.
"externalDependencies": ["puppeteer", "puppeteer-cluster", "bull", "bull-board"]
Sample:
What is the externalDependencies ?
https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/server/schema.json
If you have the better solution and any feedbacks, please share for me. Thanks

Class 'SqlFormatter' is missing CAKEPHP 3 DebugKit

I've just installed the latest Debugkit from https://github.com/cakephp/debug_kit.
Everything is working. However, when I clicked on the "SQL Log", the CakePHP logo keeps spinning. I tried to debug by opening up the console.log and saw an 500 error. It shows the below.
Error: Class 'SqlFormatter' not found
File /Applications/MAMP/htdocs/App/vendor/cakephp/debug_kit/src/Template/Element/sql_log_panel.ctp
Line: 24
From my understanding, SqlFormatter class is not found in sql_log_panel.ctp. How can I add/declare the SqlFormatter class?
Just install it via composer, problem very likely solved then.
https://getcomposer.org/doc/00-intro.md
http://book.cakephp.org/3.0/en/installation.html#installing-cakephp
I highly recommend you to become familiar with composer, it is a standard tool for php developers for some time now. Composer will automatically install the dependencies for you.
Your second best option would be to download the SqlFormatter package manually from where ever it comes from and set your autoloading or include manually up.

CakePHP searching for DebugKit at wrong path

I am trying to import DebugKit and CakePHP is producing the following error: DebugKit.ToolbarComponent could not be found.
Right below it, it says:
Create the class ToolbarComponent below in file:
/Users/SomeUser/Sites/SomeProject/app/Plugin/DebugKit//Controller/Component/ToolbarComponent.php
If you notice though, there are two slashes between DebugKit and Controller for some reason, and that's obviously not a real directory. The server running PHP 5.4.17. I have followed the exact installation instructions listed here. Any suggestions?
I had the same problem and solved it by changing the permissions to 755 to folders within DebugKit.
When I encountered this problem, I realized I had a Plugin/DebugKit folder structure in my project's root, and under the app directory. The one under app was empty, save for a blank file called empty. Strange. I have no idea how this happened. (Perhaps from accidentally running composer as non-root?) I deleted app/Plugin/DebugKit, and moved the one from the project root into app. No more error.
DebugKit does not currently seem to be compatible with cakephp 3.0 even though it is the example in the documentation.
The latest version still seems to use the 2.x methods.
I will also submit a ticket regarding this to update their documentation to prevent confusion.
If there is something I missed regarding this issue and it is actually possible to install this, let me know.

GAE: java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set

Starting from June, 12 my app that is used DriveAPI faced the following error (it's shown in GAE server log):
java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/api/client/json/GenericJson;
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:166)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:87)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:357)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:350)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:289)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:266)
at com.google.api.client.json.JsonParser.parseAndClose(JsonParser.java:141)
at com.google.api.client.json.JsonFactory.fromInputStream(JsonFactory.java:223)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.load(GoogleClientSecrets.java:195)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doImport(AutoImportBackend.java:112)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doPost(AutoImportBackend.java:76)
......
It seems like this problem comes with 1.8.1 version of AppEngine release. Before it worked well... Did someone have the same problem? And what could be the solution for this?
It's a classpath collision.
If war/WEB-INF/lib contains multiple versions of the DriveAPI jars, strange issues may result from the wrong version loading during runtime. Removing outdated jars solves the problem.
(Note: I copied and formatted the answer that the original asker added to the question via an edit. I did this as a cleanup task.)

Resources