Search This Blog

Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Tuesday, September 20, 2022

React Native TypeError: cli.init is not a function Error !

1. Dont use react-native init <ProjectName>


use like below.

npx react-native init YourProjectName --version 0.68.2



Monday, October 11, 2021

Install Latest ImageMagick to support PNG, JPG convertions

 #These are the steps required in order to Install ImageMagick with JPG, PNG and TIFF delegates.

sudo apt-get update 

#Install Build-Essential in order to configure and make the final Install

sudo apt-get install build-essential 

#libjpg62-dev required in order to work with basic JPG files

sudo apt-get install -y libjpeg62-dev 

#libtiff-dev is required in order to work with TIFF file format

sudo apt-get install -y libtiff-dev 

#libpng-dev required in order to work with basic PNG files

sudo apt-get install -y libpng-dev

#Download ImageMagick

wget https://www.imagemagick.org/download/ImageMagick.tar.gz 

#Untar Imagemagick

tar xvzf ImageMagick.tar.gz 

#Access the working directory

cd ImageMagick-[version_number] 

#Configure and make sure to disable the "shared" option

./configure --disable-shared

#Make

sudo make

#Install

sudo make install

#Final Check

sudo make check

Tuesday, September 7, 2021

Eclipse - Python Import Libraries or Error issues fixes

 step 1) Removing the interpreter, auto configuring it again

step 2) Window - Preferences - PyDev - Interpreters - Python Interpreter Go to the Forced builtins tab Click on New... Type the name of the module (tensorflow in my case) and click OK

step 3) Right click in the project explorer on whichever module is giving errors. Go to PyDev->Code analysis.

Tuesday, August 31, 2021

Python - ImportError: cannot import name 'signature' from 'sklearn.utils.fixes'

 Please install funcsigs directly using

pip install funcsigs

and use from funcsigs import signature instead.


#ex:

#from sklearn.utils.fixes import signature

from funcsigs import signature



-- enjoy

Wednesday, June 30, 2021

Joomla Wordpress - Friendly URL not working


1. Open Cpanel -> File Manager
    Top right corner ->Settings or find settings 
    Show Hidden Files. 

2. Goto public_html folder/.htaccess
paste the below block, save & close.

<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

3. Now goto global configuration ->joomla -> turn on Friend URL redirection.

Tuesday, May 11, 2021

Eclipse - PHP Fatal error: Call to undefined function json_decode()

Add PHP 

1. Window->Preferences->Installed PHPs-> Add

    /usr/bin/<search php> select /usr/bin/php7.4.x

2. Check "Window->Preferences->Installed PHPs" checkbox "Use system default php.ini configuration" must be enabled. And I had to setup "apt install php-json" on my Ubuntu.

3. Enable Debug

   Open Terminal -> sudo apt-get install php-xdebug

4. Check "Window->Preferences->Installed PHPs" ->Debuger -> XDebug [from dropdown]



Enjoy

Monday, October 5, 2020

Ubuntu - Maven - SSL Error while doing mvn clean install

sudo dpkg --purge --force-depends ca-certificates-java sudo apt-get install ca-certificates-java sudo update-ca-certificates -f

Wednesday, July 15, 2020

Tuesday, July 14, 2020

Install HP Printer in Ubuntu 20.04

Goto https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
download the hplib with for your OS.

> cd /home/drvijay/Downloads/

> sudo chmod +x hplip-3.20.6.run
> ./hplip-3.20.6.run

or

> sudo apt install hplip-gui

#if any error, then below command will fix

> sudo apt install $(echo $(apt-cache search hplip | sed 's/ - .*$//g'))


















windows key -> type -> hp tool box

Sunday, April 12, 2020

Python Flask AttributeError: 'Request' object has no attribute 'is_xhr'

#. Remove flask and install recent version

    pip uninstall flask
    pip intall flask


#. Else, go to your requirements.txt remove the verions of your plugins/libraries.
   ex: flask=0.12.0
          to
         flask


Re run the requriements.txt and make sure all it is now in updated version.
#before uninstall manually and run the below command.

pip install -r requirements.txt


Tuesday, February 18, 2020

Joomla ERROR: The archive file is corrupt, truncated or archive parts

Open configuration.php

Modify 
public $tmp_path = '../tmp';
public $tmp_path = 'tmp';

TO [add slash only]
public $tmp_path = '/tmp';

How to disable warning in Joomla - Continue to Continue 2

Go to Administrator->System menu -> Global Configuration -> Server -> Error reporting -> NONE

OR

Open configuration.php

public $error_reporting = 'none';






Enjoy

Thursday, February 13, 2020

How to Disable WordPress PHP Error Warning Messages - XMAPP

wp-config.php



Remove those lines 
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);


Paste these lines
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);


Tuesday, December 24, 2019

Flask Ask - modulenotfounderror no module named 'pip.req' flask-ask

Try like below.


pip install git+https://github.com/johnwheeler/flask-ask.git@v0.8.8

pip install flask-ask




#Enjoy

Thursday, August 22, 2019

Install Python 3.x 3.7 in Ubuntu 18 from Bundle

Steps

1.   Donwload the tar - Python-3.7.4.tar.xz
2.  cd /home/ubuntu/
3.  tar xf Python-3.7.4.tar.xz
4   chmod 775 Python-3.7.4
5   chown -R root Python-3.7.4
6   chown -R root Python-3.7.4
7   cd Python-3.7.4/
8   ./configure
9   ./configure --enable-optimizations
10  make
11  make test
12  sudo make install
13  python3 --version
14  pip3
15  which python3


Your Sample Rest Application
1  cd /opt/stock/stockautobot
2  pip3 install -r requirements.txt
3  python3 app.py


Any package/module missed. please use below command to add
1  pip3 install requests


RUN
1 wget http://127.0.0.1:5002/
2 curl http://localhost:5002/


Tuesday, August 13, 2019

Python : websocket-client 0.56.0 error: [Errno 2] No such file or directory: script.tmpl

1. Create a file script.tmpl under C:\Users\xxx\AppData\Roaming\Python\Python37\site-packages

2. paste the below code

# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
__import__('pkg_resources').run_script(%(spec)r, %(script_name)r)


3. run your setup again
py setup.py install


-- Enjoy



Thursday, December 21, 2017

Error: The server encountered an error processing the request. See server logs for more details

This issue comes into picture whenever there is any issue at WCF service.
So see more details about the issue, you need to includeexceptiondetailInfaults attribute to true in servicedebug tag.

Go to your web.config


<servicebehaviors>
        <behavior name="myServiceBehavior">
          <servicedebug includeexceptiondetailinfaults="true" />
        </behavior>
</servicebehaviors>

Either you can also add class attribute to the service class.

Sunday, February 26, 2017

M2_REPO classpath Issues In Eclipse IDE

1. Add M2_REPO Manually

Define and add M2_REPO classpath variable manually into Eclipse IDE. Follow below steps :
  1. Eclipse IDE, menu bar
  2. Select Window > Preferences
  3. Select Java > Build Path > Classpath Variables
  4. Click on the new button > defined a new M2_REPO variable and point it to your local Maven repository
  5. Done.


2. SIMPLY DELETE AND RECREATE UR WORKSPACE


1. Delete your workspace
2. Import your projects with "Existing Maven Project"

NOTE: this will create M2_repo in your classpath. no worries. 


Monday, June 21, 2010

OWASP - Improper Error Handling DAO

Every piece of information an attacker receives about a targeted system or application is a valuable weapon. It is the job of application designers and programmers to keep these weapons from the hands of the enemy. Unfortunately, many Web applications cannot handle errors and, as a result, improper error handling occurs.
Because they contain valuable debugging information, error messages are intended for those who figure out and fix problems. Trouble arises when end users see these messages and use the information to solicit an attack. Here are four ways error messages can create security problems:
1. Many default messages divulge basic information about a system. This information, which may be presented as part of the message or inferred from the format, aids the attacker in selecting which techniques and exploits will help him gain access.
2. Attackers can use error messages to extract specific information from a system.
Example 1: If an attacker attempts to break in by brute force, error messages that include specifics, such as "invalid user name" or "invalid password" are more valuable than if they received a generic message, such as "Login incorrect."
Example 2: Attackers can determine which directories or files exist on a given Web server if it distinguishes between "directory or file not found" and "you are not authorized to see this directory or file." To prevent this, redirect them to the homepage, which will confound some automated attack tools.
Example 3: Errors that supply the full path name to executables, data files and other system assets help the attacker understand how things are laid out behind the firewall. In some cases, they reveal hosts of interest as well.
Example 4: Database errors can be especially helpful to attackers, providing them with host names of internal systems, as well as database, table and field names that can be used to craft SQL injection attacks.
3. Attackers can also use unexpected errors to knock an application off line, creating a denial-of-service attack. These attacks are created by taking advantage of error conditions that consume system resources, such as CPU and disk.
4. In a worst-case scenario, unexpected errors can provide an attacker with a buffer or stack overflow condition that sets the stage for an arbitrary code execution.
TIPS:-
So, what is a programmer to do? Do not rely on the operating system, server, database or other underlying packages to provide error handling. All errors should be handled by code the programmer writes. A well-designed application should include handlers for anticipated error conditions and a failsafe error handler for unanticipated conditions.
Error handlers should capture relevant, detailed information in a secure log for future analysis and present users with a generic error message that does not contain sensitive information. When designing the log file, keep security in mind. It should capture information such as user identifiers, IP addresses, dates and times for pattern analysis.
Having an error log is not enough, however. Someone will need to look at the log and analyze its contents. Many application-level reconnaissance and attacks can be detected by looking for patterns in log files. If a log file shows many error conditions falling through to the default exception handler, it may be time to update the error-handling code to deal with other conditions.
These best practices require the application designer and programmer to think like an attacker. When designing an error message, stop and think about whether it is presenting information the user shouldn't see or that an attacker could use.
Owners of Internet-based services and businesses are at war with those who seek to attack their applications -- don't give them additional information and weapons by saving a little time on error handling!

while (DoSomething()) {
try {
/* perform main loop here */
}
catch (Exception &e){
/* do nothing, but catch so it'll compile... */

//ERROR can log into AUDIT TRAIL with Type : ERROR

}
}





<!--
1. add this tags in web.xml
2. create "error.jsp" like below
3. add the audittrail statement in all your catch {} block like below
-->


<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>400</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>401</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>402</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>javax.faces.FacesException</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>java.io.EOFException</exception-type>
<location>/error.jsp</location>
</error-page>




//error.jsp [you can design your custom error page]
//*********************************************************************************************

Error Contact Administrator
<a href="./homeOrindex.jsp">Home</a> <!-- the page should be redirect to your home or index page according to your decision -->



//catch {} block general format
//*********************************************************************************************

DOAuditTrail doaudittrail = new DOAuditTrail("userId here", "ipAddress here", "ERROR" , "description here"), "status here", "session id here" );
PDOAuditTrail.auditTrailDAO(doaudittrail);

//when ever you need to view this details, create a view and make a select query and display

Hit Counter


View My Stats