Category Archives: Error

CheckPoint Remote Access client on macOS fails to connect with “Connectivity with the VPN service is lost” error message

Symptoms

  1. Remote Access client on macOS fails to connect with “Connectivity with the VPN service is lost” error message.
  2. TrGui debug shows:
    [26 Apr 12:34:34][TR_API] TR_API::TrAPI::TrAPIInitThread: Critical error. breaking.
    [ 14717 0x700007cba000][26 Apr 12:34:34][TR_API] TR_API::TrAPI::TrAPIInitThread: API Inited FAIL
    [ 14717 0x700007cba000][26 Apr 12:34:34][TR_API] TR_API::TrAPI::TrAPIInitThread: TrAPIInitThread finished
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPI::TrAPIInit: connection to the service couldn’t be established
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPI::TrAPIInit: TrAPIInit failed
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPIDestroy: Entering…
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPIDestroy: Called not from the message loop thread, raising trigger
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPIDestroy: Failed to rais trigger
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_API] TR_API::TrAPIDestroy: Done
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TR_APIWRAPPER] TrAPIWrapper::InitAPI: failed to init API.
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TrGUI] TrApplication::InitAPI: failed to init API
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TrGUI] new connection status: Terminated
    [….] [TrGUI] TrMainWindow::ShowBalloon: Showing text Connectivity with the VPN service is lost
    [ 14717 0x10ce41e00][26 Apr 12:34:34][TrGUI] TrApplication::GetResourceFullPath: Returning /Applications/Endpoint Security VPN.app/Contents/Resources/errorNotification.png
    [ 14717 0x10ce41e00][26 Apr 12:34:36][TrGUI] WatchDogThread::queryServiceSlot: Trying to init api
    [ 14717 0x10ce41e00][26 Apr 12:34:36][TR_API] TR_API::TrAPI::TrAPIInit: enter …
    [ 14717 0x700008155000][26 Apr 12:34:36][TR_API] TR_API::TrAPI::TrAPIInitThread: Initializing…
    [ 14717 0x700008155000][26 Apr 12:34:36][MessageLoop] MessageLoop::MessageLoop::PeriodicSchedCB: entering.
    [ 14717 0x700008155000][26 Apr 12:34:36][messaging] messaging::setup: created a new

Cause

  • The process com.checkpoint.epc.service.plist is disabled.

Solution

  • Enable the process with the command:
# sudo launchctl load -w /Library/LaunchDaemons/com.checkpoint.epc.service.plist

This will remove the service’s Daemon from the list of disabled services, and then run it. From that point on, the system will run its daemon automatically.
This change will survive reboot.

  • The user can check if the service is running with
    # sudo launchctl list | grep com.che.

[Solved] aarch64-none-elf-gcc: fatal error: cannot execute ‘cc1’: execvp: No such file or directory

root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# make
mkdir -p build
aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
make: aarch64-none-elf-gcc: Command not found
Makefile:16: recipe for target 'build/kernel_c.o' failed
make: *** [build/kernel_c.o] Error 127
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# export PATH="$PATH:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/bin/"
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# aarch64-none-elf-gcc --version
aarch64-none-elf-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Still report error
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# make
mkdir -p build
aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
make: aarch64-none-elf-gcc: Command not found
Makefile:16: recipe for target 'build/kernel_c.o' failed
make: *** [build/kernel_c.o] Error 127
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
aarch64-none-elf-gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31#

 

root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf# find ./ -name cc1
./libexec/gcc/aarch64-none-elf/10.3.1/cc1
root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf#

 

root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf# ls /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1 
/root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1

 

root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf# ln -s /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1  /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/bin/cc1
root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf# make
make: *** No targets specified and no makefile found.  Stop.
root@ubuntu:~/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf# cd -
/root/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# make
mkdir -p build
aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
make: aarch64-none-elf-gcc: Command not found
Makefile:16: recipe for target 'build/kernel_c.o' failed
make: *** [build/kernel_c.o] Error 127
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
aarch64-none-elf-gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# ls /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/bin
aarch64-none-elf-addr2line   aarch64-none-elf-gcc-nm         aarch64-none-elf-lto-dump
aarch64-none-elf-ar          aarch64-none-elf-gcc-ranlib     aarch64-none-elf-nm
aarch64-none-elf-as          aarch64-none-elf-gcov           aarch64-none-elf-objcopy
aarch64-none-elf-c++         aarch64-none-elf-gcov-dump      aarch64-none-elf-objdump
aarch64-none-elf-c++filt     aarch64-none-elf-gcov-tool      aarch64-none-elf-ranlib
aarch64-none-elf-cpp         aarch64-none-elf-gdb            aarch64-none-elf-readelf
aarch64-none-elf-elfedit     aarch64-none-elf-gdb-add-index  aarch64-none-elf-size
aarch64-none-elf-g++         aarch64-none-elf-gfortran       aarch64-none-elf-strings
aarch64-none-elf-gcc         aarch64-none-elf-gprof          aarch64-none-elf-strip
aarch64-none-elf-gcc-10.3.1  aarch64-none-elf-ld             cc1
aarch64-none-elf-gcc-ar      aarch64-none-elf-ld.bfd
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# ls /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/bin -al
total 161476
drwxr-xr-x 2  802  802     4096 Mar 16 23:09 .
drwxr-xr-x 8  802  802     4096 Jul 13  2021 ..
-rwxr-xr-x 1  802  802  1222520 Jul  2  2021 aarch64-none-elf-addr2line
-rwxr-xr-x 2  802  802  1252664 Jul  2  2021 aarch64-none-elf-ar
-rwxr-xr-x 2  802  802  2331488 Jul  2  2021 aarch64-none-elf-as
-rwxr-xr-x 2  802  802  1345616 Jul  2  2021 aarch64-none-elf-c++
-rwxr-xr-x 1  802  802  1217312 Jul  2  2021 aarch64-none-elf-c++filt
-rwxr-xr-x 1  802  802  1353952 Jul  2  2021 aarch64-none-elf-cpp
-rwxr-xr-x 1  802  802    43704 Jul  2  2021 aarch64-none-elf-elfedit
-rwxr-xr-x 2  802  802  1345616 Jul  2  2021 aarch64-none-elf-g++
-rwxr-xr-x 2  802  802  1345576 Jul  2  2021 aarch64-none-elf-gcc
-rwxr-xr-x 2  802  802  1345576 Jul  2  2021 aarch64-none-elf-gcc-10.3.1
-rwxr-xr-x 1  802  802    36808 Jul  2  2021 aarch64-none-elf-gcc-ar
-rwxr-xr-x 1  802  802    36808 Jul  2  2021 aarch64-none-elf-gcc-nm
-rwxr-xr-x 1  802  802    36816 Jul  2  2021 aarch64-none-elf-gcc-ranlib
-rwxr-xr-x 1  802  802   878096 Jul  2  2021 aarch64-none-elf-gcov
-rwxr-xr-x 1  802  802   600296 Jul  2  2021 aarch64-none-elf-gcov-dump
-rwxr-xr-x 1  802  802   622296 Jul  2  2021 aarch64-none-elf-gcov-tool
-rwxr-xr-x 1  802  802 99760976 Jul  2  2021 aarch64-none-elf-gdb
-rwxr-xr-x 1  802  802     4045 Jul  2  2021 aarch64-none-elf-gdb-add-index
-rwxr-xr-x 1  802  802  1345960 Jul  2  2021 aarch64-none-elf-gfortran
-rwxr-xr-x 1  802  802  1291344 Jul  2  2021 aarch64-none-elf-gprof
-rwxr-xr-x 4  802  802  3341640 Jul  2  2021 aarch64-none-elf-ld
-rwxr-xr-x 4  802  802  3341640 Jul  2  2021 aarch64-none-elf-ld.bfd
-rwxr-xr-x 1  802  802 29902472 Jul  2  2021 aarch64-none-elf-lto-dump
-rwxr-xr-x 2  802  802  1233792 Jul  2  2021 aarch64-none-elf-nm
-rwxr-xr-x 2  802  802  1358320 Jul  2  2021 aarch64-none-elf-objcopy
-rwxr-xr-x 2  802  802  2681488 Jul  2  2021 aarch64-none-elf-objdump
-rwxr-xr-x 2  802  802  1252672 Jul  2  2021 aarch64-none-elf-ranlib
-rwxr-xr-x 2  802  802   951736 Jul  2  2021 aarch64-none-elf-readelf
-rwxr-xr-x 1  802  802  1226864 Jul  2  2021 aarch64-none-elf-size
-rwxr-xr-x 1  802  802  1222328 Jul  2  2021 aarch64-none-elf-strings
-rwxr-xr-x 2  802  802  1358320 Jul  2  2021 aarch64-none-elf-strip
lrwxrwxrwx 1 root root       95 Mar 16 23:09 cc1 -> /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# ls /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1
/root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# ls /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1 -al
-rwxr-xr-x 1 802 802 31068504 Jul  2  2021 /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1

 

Solution: add /usr/bin/cc1 as below.

root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# ln -s /root/arm/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/libexec/gcc/aarch64-none-elf/10.3.1/cc1  /usr/bin/cc1
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# make
mkdir -p build
aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
make: aarch64-none-elf-gcc: Command not found
Makefile:16: recipe for target 'build/kernel_c.o' failed
make: *** [build/kernel_c.o] Error 127
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31# aarch64-none-elf-gcc -Wall -nostdlib -nostartfiles -ffreestanding -Iinclude -mgeneral-regs-only -g -MMD -c src/kernel.c -o build/kernel_c.o
In file included from src/kernel.c:1:
include/printf.h:94:10: fatal error: stdarg.h: No such file or directory
   94 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
root@ubuntu:~/arm/raspberry-pi-os/exercises/lesson05/3/bl4ckout31#

[Solved] mujoco_py Run example Error: ERROR: GLEW initalization error: Missing GL version

After the successful installation of mujoco_py, run the example in the built-in example and find an error:  ERROR: GLEW initalization error: Missing GL version

 

 

 

 

Modify the configuration in .vimrc and add the following:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

 

 

 

 

 

 

 

=================================================

 

 

 

 

All examples of mujoco_py below:

 

 

 

 

 

 

 

requires attention:

 

Run the example that comes with mujoco-py:

body_interaction.py disco_fetch.py ​​markers_demo.py render_callback.py setting_state.py tosser.py

Environment variables need to be set:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

Otherwise, an error will be reported:

ERROR: GLEW initalization error: Missing GL version

 

 

Run the built-in example:

internal_functions.py multigpu_rendering.py

Environment variables need to be set:

export LD_PRELOAD=”

Otherwise, an error will be reported.

 

 

 

For a personal analysis of the environment variable export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so setting:

The mujuco211 version itself comes with the glew library, so when running mujuco-py to run the simulation, set export LD_PRELOAD=”

But when running the visual drawing, you need to call the glew library of the system. At this time, set export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

If the glew library of the system is not called when drawing, a version error will be reported, and if the glew library of mujoco itself is not called when running the simulation, an error will also be reported.

 

 

 

 

The serialize_model.py substep_callback.py in the example does not need to set environment variables.

 

 

mjvive.py needs the support of VR SDK, etc., which is not considered here. (This should be run after you install HTC’s VR device client on your linux computer)

MyBatis Error: Error building SqlSession [How to Solve]

MyBatis Error building SqlSession.

The error may exist in SQL Mapper Configuration

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.ClassNotFoundException

In the configuration file:

<mappers>
    <mapper class="com/base/dao/UserMapper.xml"/>
</mappers>

written as:

<mappers>
    <mapper resource="com/base/dao/UserMapper.xml"/>
</mappers>

If you still can’t find it, you can configure pom.xml

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
        </resource>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
        </resource>
    </resources>
</build>

[Solved] Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.

Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
npm run dev prompts the following error

Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.

Reason: node-sass version is too high, uninstall and reinstall the lower version

1. Uninstall: npm uninstall node-sass

2. Installation: npm install [email protected]

3. Run: npm run dev

[Solved] Json.Net – Error getting value from ‘ScopeId’ on ‘System.Net.IPAddress’

The IPAddress class is not very friendly to serialization, as you’ve seen. Not only will it throw a SocketException if you try to access the ScopeID field for an IPv4 address, but it will also throw if you try to access the Address field directly for an IPv6 address.

To get around the exceptions, you will need a custom JsonConverter. A converter allows you to tell Json.Net exactly how you’d like it to serialize and/or deserialize a particular type of object. For an IPAddress, it seems the easiest way to get the data that satisfies everyone is simply to convert it to its string representation and back. We can do that in the converter. Here is how I would write it:

class IPAddressConverter : JsonConverter
{
    public override bool CanConvert(Type objectType)
    {
        return (objectType == typeof(IPAddress));
    }

    public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
    {
        writer.WriteValue(value.ToString());
    }

    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
    {
        return IPAddress.Parse((string)reader.Value);
    }
}

Pretty straightforward, as these things go. But, this is not the end of the story. If you need to go round-trip with your IPEndPoint, then you will need a converter for it as well. Why? Because IPEndPoint does not contain a default constructor, so Json.Net will not know how to instantiate it. Fortunately, this converter is not difficult to write either:

class IPEndPointConverter : JsonConverter
{
    public override bool CanConvert(Type objectType)
    {
        return (objectType == typeof(IPEndPoint));
    }

    public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
    {
        IPEndPoint ep = (IPEndPoint)value;
        JObject jo = new JObject();
        jo.Add("Address", JToken.FromObject(ep.Address, serializer));
        jo.Add("Port", ep.Port);
        jo.WriteTo(writer);
    }

    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
    {
        JObject jo = JObject.Load(reader);
        IPAddress address = jo["Address"].ToObject<IPAddress>(serializer);
        int port = (int)jo["Port"];
        return new IPEndPoint(address, port);
    }
}

So, now that we have the converters, how do we use them? Here is a simple example program that demonstrates. It first creates a couple of endpoints, serializes them to JSON using the custom converters, then immediately deserializes the JSON back into endpoints again using the same converters.

public class Program
{
    static void Main(string[] args)
    {
        var endpoints = new IPEndPoint[]
        {
            new IPEndPoint(IPAddress.Parse("8.8.4.4"), 53),
            new IPEndPoint(IPAddress.Parse("2001:db8::ff00:42:8329"), 81)
        };

        var settings = new JsonSerializerSettings();
        settings.Converters.Add(new IPAddressConverter());
        settings.Converters.Add(new IPEndPointConverter());
        settings.Formatting = Formatting.Indented;

        string json = JsonConvert.SerializeObject(endpoints, settings);
        Console.WriteLine(json);

        var endpoints2 = JsonConvert.DeserializeObject<IPEndPoint[]>(json, settings);

        foreach (IPEndPoint ep in endpoints2)
        {
            Console.WriteLine();
            Console.WriteLine("AddressFamily: " + ep.AddressFamily);
            Console.WriteLine("Address: " + ep.Address);
            Console.WriteLine("Port: " + ep.Port);
        }
    }
}

Here is the output:

[
  {
    "Address": "8.8.4.4",
    "Port": 53
  },
  {
    "Address": "2001:db8::ff00:42:8329",
    "Port": 81
  }
]

AddressFamily: InterNetwork
Address: 8.8.4.4
Port: 53

AddressFamily: InterNetworkV6
Address: 2001:db8::ff00:42:8329
Port: 81

Fiddle: https://dotnetfiddle.net/tK7NKY

  • Code of WriteJson can be simplified using JObject too. 
  • Performance impact of WriteJson and ReadJson can be improved by using the writer and reader objects, avoiding JObject allocation. I have submitted an edit to this very useful answer.

FileReader Object Error: FileReader Error: Object is already busy reading blob

    var blob = this .file.slice( this .readed, this .readed + this .step);
             this .reader.readAsArrayBuffer(blob);

 

Solution:

When the reader reads, first judge the readyState value, and then execute the reading if it is not loading.

    if  (this.reader.readyState == 1)
                 return ;
             var blob = this .file.slice( this .readed, this .readed + this .step);
             this .reader.readAsArrayBuffer(blob);

 

 

readyState FileReader

value condition describe
0 EMPTY Reader has been created. No read methods have been called yet.
1 LOADING The read method has been called.
2 DONE The operation is complete.
EMPTY
Created, but the readAs method has not yet been called .FileReader
LOADING
The readAs method is called. An or is being read , but an error has not yet occurred.FileBlob
DONE
The read operation is complete. This could mean: the whole or was read into memory, a file read error occurred, or the read was canceled when called.FileBlobabort()
var reader = new FileReader(); 
console.log( 'EMPTY', reader.readyState); // readyState will be 0 

reader.readAsText(blob); 
console.log( 'LOADING', reader.readyState); // readyState will be 1 

reader.onloadend = function () { 
  console.log( 'DONE', reader.readyState); // readyState will be 2 
};

Nginx Install Error: ./configure: error: the HTTP rewrite module requires the PCRE library.

Error Messages:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using –without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using –with-pcre= option.

Solution:

yum install -y pcre-devel

[Solved] Error: No module factory available for dependency type: ContextElementDependency

Error Message:

40% building 68/69 modules 1 active ...im\Web.UI.Claim\wwwroot\src\styles.scss× 「wdm」: Error: No module factory available for dependency type: ContextElementDependency
at addDependency (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:800:12)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:816:5)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:819:5)
at Compilation.processModuleDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:827:4)
at afterBuild (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:954:15)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:998:11
at callback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:734:5)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:782:12
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:282:4
at ContextModule.result.resolveDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:51 at ContextModule.build (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:203:8)
at Compilation.buildModule (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:739:10)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:981:14
D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16
throw new Error('Callback was already called.');
^
Error: Callback was already called.
at throwError (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16:11)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:2818:7
at processTicksAndRejections (internal/process/task_queues.js:79:11)

 

      1. Solution:
        1. Package.json: remove webpack from DevDependencies
        2. rm -R node_modules (remove node_modules folder)
        3. npm i -g webpack
        4. npm i -g webpack-dev-server
        5. remove package-lock.json (if it’s there)
        6. npm i
        7. npm start

 

Error creating bean with name ‘scopedTarget.oauth2ClientContext’: Scope ‘session’ is not active for the current thread;

Solution:

@SpringBootApplication
@EnableEurekaClient
@RibbonClient(name = "say-hello"/*, configuration = RibbonConfig.class*/)
@EnableAutoConfiguration
@EnableOAuth2Sso
public class HelloWorldStarter {

    public static void main(String[] args) {
        SpringApplication.run(HelloWorldStarter.class, args);
    }

    @Bean
    public RequestContextListener requestContextListener() {
        return new RequestContextListener();
    }
     //.......      
}

The following is the error prompt:

10:04:00.710 [http-nio-7602-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/client2].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/client2] threw exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.oauth2ClientContext': Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:357) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) ~[spring-aop-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at com.sun.proxy.$Proxy158.getAccessToken(Unknown Source) ~[?:?]
    at org.springframework.security.oauth2.client.OAuth2RestTemplate.getAccessToken(OAuth2RestTemplate.java:169) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.attemptAuthentication(OAuth2ClientAuthenticationProcessingFilter.java:105) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:60) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
    at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:55) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:345) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    ... 50 more

Reference:

https://stackoverflow.com/questions/50405838/error-creating-bean-with-name-scopedtarget-oauth2clientcontext-scope-session