Build Error When Enabling WebSocketServer Plug-in in Monaca

Asked 2 years ago, Updated 2 years ago, 115 views

When I enable the WebSocketServer plug-in for Cordva 3.5.1 in Monaca and build the Android app, the following error occurs:

A similar error occurred when HttpServer was enabled for the same Cordva 3.5.1 but there was no problem when Share was enabled.
Do I need any other settings to use WebSocketServer or HttpServer?

Temporary folder: /private/tmp/monaca/eec3fd17f324a81a
Downloading project
Download complete
Running for 3.5
Installing "mobi.monaca.plugins.Monaca" for android
cordova version not detected (lacks script "/private/tmp/monaca/eec3fd17f324a81a/android/skeleton/platforms/android/cordova/version"), continuing.
Installing "mobi.monaca.plugins.WebSocketServer" for android
cordova version not detected (lacks script "/private/tmp/monaca/eec3fd17f324a81a/android/skeleton/platforms/android/cordova/version"), continuing.
Installing "org.apache.cordova.splashscreen" for android
Plugin "mobi.monaca.plugins.Monaca" already installed on android.
Plugin "org.apache.cordova.splashscreen" already installed on android.
Fetching plugin"/data/monaca_build_module/plugins/[email protected]" via plugin registry
Error:404 Not Found:data
at RegClient.<anonymous>(/data/monaca_build_module/3.5/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.148>)<: at Request.self.callback(/data/monaca_build_module/3.5/node_modules/cordova/node_modules/codeova-lib/node_modules/npm/node_modules/request/index.js:148:22)
at Request.emit(events.js:98:17)
at Request.<anonymous>(/data/monaca_build_module/3.5/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
at Request.emit(events.js:117:20)
at IncomingMessage.<anonymous>(/data/monaca_build_module/3.5/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
at IncomingMessage.emit(events.js:117:20)
at_stream_readable.js:929:16
at process._tickCallback(node.js:419:13)
Build error:Error building project source code

AndroidManifest.xml is as follows

<?xml version="1.0" encoding="utf-8"?>
<manifest android:hardwareAccelerated="true" android:versionCode="%%%VERSION_CODE%%%" android:versionName="%%%%VERSION_NAME%%%%" android:windowSoftInputMode="adjustPan"package="%%%%%%PACKAGE_N%%%" and%%"http://schemas.android.com/apk/res/android
  <support-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" android:xlargeScreens ""true;
  <uses-permission android:name="android.permission.INTERNET"/>
  <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="%%%APPLICATION_NAME%%%%">
     <activity android:configChanges=" orientation | keyboardHidden | keyboard | screenSize | locale" android: label="%%%APPLICATION_NAME%%%" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoBartle;"
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
    </activity>
  </application>
  <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
</manifest>

This is my first time using Monaca, so I'm sorry if it's a rudimentary mistake, but I'd appreciate your guidance.

monaca

2022-09-30 20:34

1 Answers

I am suffering from the same phenomenon.Even if I enable Share, I still fail.
When running the app, plugins.httpServer(); cannot start the HTTP server with the output Uncaught TypeError: Object# has no method 'httpServer' on the console.
USB debugging shows that plugins do not include httpServer.
If you enable and debug another plug-in DatePicker, the plugins contain datePicker.
I would like to know how to use httpServer.


2022-09-30 20:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.