Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy the NREL OpenPATH app to staging #732

Closed
shankari opened this issue May 27, 2022 · 33 comments
Closed

Deploy the NREL OpenPATH app to staging #732

shankari opened this issue May 27, 2022 · 33 comments

Comments

@shankari
Copy link
Contributor

I didn't think that we needed this since it should be a simple matter of changing the URL, but I'm getting a 404 error, so maybe I do.

Completed task:

Current known tasks (in order):

  1. Connect to the server
  2. Switch to the new surveys
  3. Translate the new surveys
  4. Switch to the new summary and terms
  5. Translate the new summary and terms
  6. Switch the app name and package name
  7. Create placeholder store entries
  8. Deploy to internal testing channels

We may want to switch to an internal fork at step 2 or just make the changes to master.
But let's finish (1) first.

@shankari
Copy link
Contributor Author

Ok, so if I change the "connectUrl": "https://stage-host/study/study_name/", I get a 404 error
If I access it directly through a web URL
https://stage-host/study/study_name/profile/create

it redirects to https://stage-host/profile/create and returns a 405 error ("Method not allowed"). The 405 error is consistent with supporting only POST, not GET on that method.

Let's try:

  • connecting using python
  • try on android
  • try changing the format of the URL to split the host and path differently in iOS

@shankari
Copy link
Contributor Author

Trying on android

  • I get a 403 instead of a 404
05-27 11:05:13.696 19238 19576 D JWTAuthPlugin: Force setting the prompted auth token = <token>
05-27 11:05:13.711 19238 19576 D BuiltinUserCache: Added value for key prompted-auth at time 1.653674713696E9
05-27 11:05:13.762 19238 19576 D ConnectionSettings: in getConnectURL, connectionSettings = {"connectUrl":"https:\/\/stage-host\/study\/study_name\/","aggregate_call_auth":"no_auth","android":{"auth":{"method":"prompted-auth","clientID":"ignored"}},"ios":{"auth":{"method":"prompted-auth","clientID":"ignored"}}}
05-27 11:05:13.771 19238 19576 D ConnectionSettings: in getConnectURL, returning https://stage-host/study/study_name/
05-27 11:05:13.772 19238 12620 I System.out: Posting data to https://stage-host/study/study_name//profile/create
05-27 11:05:13.773 19238 12620 I System.out: About to execute query SELECT data FROM userCache WHERE key = 'prompted-auth' AND type = 'local-storage' AND write_ts >= 0.0 AND write_ts <= 1.653674713773E12 ORDER BY write_ts DESC
05-27 11:05:13.793 19238 12620 I PromptedAuth: Auth found in local storage, now it should be stable
org.apache.http.message.BasicHttpResponse@a2df82c with status HTTP/1.1 403 Forbidden

@shankari
Copy link
Contributor Author

shankari commented May 27, 2022

Trying on python

  • I get a 500. Ok so this is the only call for which we are actually getting to the server.
  • Not sure why the request JSON is not set properly
>>> import requests
>>> url = "..."
>>> data = {"user": "abc123"}
>>> requests.post(url, data)
<Response [500]>
>>> response = requests.post(url, data)
>>> response
<Response [500]>
>>> response.text
'\n    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n    
<html>\n       
<head>\n           
<title>Error: 500 Internal Server Error</title>\n            
<style type="text/css">\n              
<pre>Internal Server Error</pre>\n              
<h2>Exception:</h2>\n              
<pre>TypeError(&quot;&#039;NoneType&#039; object is not subscriptable&quot;)</pre>\n              
<h2>Traceback:</h2>\n              
<pre>Traceback (most recent call last):\n  
File &quot;/usr/src/app/e-mission-server/emission/net/api/bottle.py&quot;, line 997, in _handle\n    out = route.call(**args)\n
File &quot;/usr/src/app/e-mission-server/emission/net/api/bottle.py&quot;, line 1998, in wrapper\n    rv = callback(*a, **ka)\n
File &quot;emission/net/api/cfc_webapp.py&quot;, line 312, in createUserProfile\n    userEmail = enaa._getEmail(request, auth_method)\n  
File &quot;/usr/src/app/e-mission-server/emission/net/auth/auth.py&quot;, line 74, in _getEmail\n    userToken = request.json[&#039;user&#039;]\n
TypeError: &#039;NoneType&#039; object is not subscriptable\n</pre>\n        </body>\n    </html>\n'

@shankari
Copy link
Contributor Author

shankari commented May 27, 2022

Continuing on python, but explicitly using json, we get a more informative response

'\n    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n    
<html>\n       
<head>\n            
<title>Error: 403 Forbidden</title>\n            
 <h1>Error: 403 Forbidden</h1>\n            

<p>Sorry, the requested URL <tt>&#039;https://...&#039;</tt>\n               caused an error:</p>\n            
<pre>(&#039;Invalid token abc123, not found in list of length 1&#039;,)</pre>\n        
</body>\n    
</html>\n'

Looking further at the configuration for our server, we had set it up with authtype = secret
e-mission/e-mission-server@460b9e4
to support the closed recruitment option for NREL-Lo_Hi

Let's revert that since we no longer have that requirement for an NREL-only app

@shankari
Copy link
Contributor Author

Does not work even after reverting. This appears to be because the redeploy does not work.

  • 1:05: made change
  • 1:06 and 1:30: re-deployed using Jenkins
  • 1:39pm: webapp logs still have secret

@shankari
Copy link
Contributor Author

While waiting for the server to be resolved, let's look at the iOS issue.
Both android and python return a 403, for reasons that we understand.
However, iOS returns a 405. Let's see if we can get iOS to also return a 403.

In postToHost, we have

_mUrl	NSURL *	@"/profile/create -- https://study-host/study/study_name/"	0x0000600003f845a0
NSObject	NSObject	
_urlString	NSString *	0x200001d80	0x0000000200001d80
_baseURL	NSURL *	0x80001000001c020	0x080001000001c020
_clients	__NSCFString *	@"/profile/create"	0x000060000125cea0
_reserved	NSURL *	@"https://study-host/study/study_name/"	0x000060000379ab50

Note that the baseURL is not set and instead the base URL is populated in something called reserved.

error	NSError *	domain: @"com.google.HTTPStatus" - code: 404	0x000060000123f870
_userInfo	__NSFrozenDictionaryM *	0x600001c07380	0x0000600001c07380
NSDictionary	NSDictionary	

According to the NSURL documentation:
https://developer.apple.com/documentation/foundation/nsurl?language=objc

this should work

NSURL *baseURL = [NSURL fileURLWithPath:@"file:///path/to/user/"];
NSURL *URL = [NSURL URLWithString:@"folder/file.html" relativeToURL:baseURL];
NSLog(@"absoluteURL = %@", [URL absoluteURL]);

@shankari
Copy link
Contributor Author

shankari commented May 28, 2022

Ah, printing out the absolute URL gives us a clue

NSLog(@"absoluteURL = %@", [self.mUrl absoluteURL]);
2022-05-27 17:25:36.802810-0700 em-devapp[36366:5489708] DEBUG: postToHost called with url = /pipeline/get_range_ts -- https://stage-host/study/study_name/
2022-05-27 17:25:50.258271-0700 em-devapp[36366:5489708] absoluteURL = https://stage-host/pipeline/get_range_ts
2022-05-27 17:28:25.625043-0700 em-devapp[36366:5489708] DEBUG: postToHost called with url = /profile/update -- https://stage-host/study/study_name/
2022-05-27 17:28:34.743221-0700 em-devapp[36366:5489708] absoluteURL = https://stage-host/profile/update

@shankari
Copy link
Contributor Author

We create the URL like this

+(void)pushGetJSON:(NSDictionary*)toSend toURL:(NSString*)relativeURL completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler {
    NSMutableDictionary *toPush = [NSMutableDictionary dictionaryWithDictionary:toSend];
    
    NSURL* kBaseURL = [[ConnectionSettings sharedInstance] getConnectUrl];
    NSURL* absoluteURL = [NSURL URLWithString:relativeURL
                                 relativeToURL:kBaseURL];
    
    CommunicationHelper *executor = [[CommunicationHelper alloc] initPost:absoluteURL data:toPush completionHandler:completionHandler];
    [executor execute];
}

which is similar to

NSURL *baseURL = [NSURL fileURLWithPath:@"file:///path/to/user/"];
NSURL *URL = [NSURL URLWithString:@"folder/file.html" relativeToURL:baseURL];
NSLog(@"absoluteURL = %@", [URL absoluteURL]);

This returns file:///path/to/user/folder/file.html, so we should return https://stage-host/study/study_name/profile/update
Let's experiment further with why this is not happening

@shankari
Copy link
Contributor Author

This is not happening because the sample code doesn't work. For the copy-pasted example in the NSURL documentation

    NSURL *baseURL = [NSURL fileURLWithPath:@"file:///path/to/user/"];
    NSURL *URL = [NSURL URLWithString:@"folder/file.html" relativeToURL:baseURL];
    NSLog(@"absoluteURL = %@", [URL absoluteURL]);

the output is

2022-05-27 22:59:45.461654-0700 em-devapp[45938:5561235] absoluteURL = file:///file:/path/to/folder/file.html

@shankari
Copy link
Contributor Author

Changing to the instance method does not fix it. The static method probably just turns around and calls the instance method.

    NSURL *baseURL = [NSURL fileURLWithPath:@"file:///path/to/user/"];
    NSURL *testAbsoluteURL = [[NSURL alloc] initWithString:@"folder/file.html" relativeToURL:baseURL];
    NSLog(@"testAbsoluteURL = %@", [testAbsoluteURL absoluteURL]);

returns

2022-05-28 09:48:24.546339-0700 em-devapp[53565:5628169] testAbsoluteURL = file:///file:/path/to/folder/file.html

@shankari
Copy link
Contributor Author

Aha! Appending at the string level works well

    NSString* baseURLString = @"file:///path/to/user/";
    NSString* absoluteURLString = [baseURLString stringByAppendingString:@"folder/file.html"];

    NSURL *testAbsoluteURL = [NSURL URLWithString:absoluteURLString];
    NSLog(@"testAbsoluteURL = %@", [testAbsoluteURL absoluteURL]);

returns

2022-05-28 09:55:31.839879-0700 em-devapp[54675:5638619] testAbsoluteURL = file:///path/to/user/folder/file.html

@shankari
Copy link
Contributor Author

shankari commented May 28, 2022

Making a similar change to the actual URL code

    NSString* kBaseURLString = [[[ConnectionSettings sharedInstance] getConnectUrl] absoluteString];
    NSString* absoluteURLString = [kBaseURLString stringByAppendingString:relativeURL];
    NSURL* absoluteURL = [NSURL URLWithString:absoluteURLString];
    NSLog(@"absoluteURL right after creation = %@", [absoluteURL absoluteURL]);

results in the expected

2022-05-28 10:01:20.240747-0700 em-devapp[55412:5645521] absoluteURL right after creation = https://stage-host/study/<study_name>//pipeline/get_range_ts

which, in turn, results in the same 403 error as android and python

error	NSError *	domain: @"com.google.HTTPStatus" - code: 403	0x00006000009bea00

and on looking at the error in detail

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
        <head>
            <title>Error: 403 Forbidden</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans-serif;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 403 Forbidden</h1>
            <p>Sorry, the requested URL <tt>&#039;https://stage-host/pipeline/get_range_ts&#039;</tt>
               caused an error:</p>
            <pre>Invalid token [...], not found in list of length 1</pre>
        </body>
    </html>

@shankari
Copy link
Contributor Author

While implementing this, let's change the exported value from the connection settings to return a string instead of a URL.

  • No reason to convert from String -> URL -> String
  • We can ensure that we convert all call sites

shankari added a commit to shankari/cordova-connection-settings that referenced this issue May 29, 2022
This allows us to construct relative URLs by appending strings
instead of using the relative URL method, which doesn't work if the base URL is
a URL as opposed to just a hostname.

e-mission/e-mission-docs#732 (comment)
shankari added a commit to shankari/cordova-server-communication that referenced this issue May 29, 2022
Instead on the relativeURL method.

This is because the relative URL appraoch does not work on iOS even though the
documentation says that it should

Relative URL doesn't work: e-mission/e-mission-docs#732 (comment)
Appending strings does work: e-mission/e-mission-docs#732 (comment)
shankari added a commit to shankari/cordova-server-sync that referenced this issue May 29, 2022
Instead on the relativeURL method.

This is because the relative URL appraoch does not work on iOS even though the documentation says that it should

Relative URL doesn't work: e-mission/e-mission-docs#732 (comment)
Appending strings does work: e-mission/e-mission-docs#732 (comment)

Related updates: https://github.com/e-mission/cordova-connection-settings/releases/tag/v1.2.3
shankari added a commit to e-mission/e-mission-phone that referenced this issue May 29, 2022
This is a fix for the issue where the relative URL code on iOS doesn't work per
documentation.

Relative URL doesn't work: e-mission/e-mission-docs#732 (comment)
Appending strings does work: e-mission/e-mission-docs#732 (comment)

Includes fixes to:
- connection settings to return a string instead of a URL
    e-mission/cordova-connection-settings#22
- server-communication and server-sync to concatenate directly using strings
  instead of using a relative URL
    e-mission/cordova-server-communication#30
    e-mission/cordova-server-sync#52
@shankari
Copy link
Contributor Author

Let's now work on (2) and (3) from the original list while waiting for the server configuration to change.
We will go ahead and update these on the master branch. The existing demographic survey appears to be a placeholder from UNSW anyway and is not one that we really want to be the default.

shankari added a commit to e-mission/e-mission-devapp that referenced this issue May 30, 2022
This is a fix for the issue where the relative URL code on iOS doesn't work per
documentation.

Relative URL doesn't work: e-mission/e-mission-docs#732 (comment)
Appending strings does work: e-mission/e-mission-docs#732 (comment)

Includes fixes to:
- connection settings to return a string instead of a URL
    e-mission/cordova-connection-settings#22
- server-communication and server-sync to concatenate directly using strings
  instead of using a relative URL
    e-mission/cordova-server-communication#30
    e-mission/cordova-server-sync#52
@shankari
Copy link
Contributor Author

there used to be very clear documentation of how to use xforms in enketo, but I can't find it now.
Fortunately, per this previous comment, #376 (comment)
we are supposed to use enketo transformer.
https://github.com/enketo/enketo-transformer

https://enketo.org/develop/#transformation

Since we have merged the survey code into master, let's add this as a devDependency as well to make it easier to update the forms.

The UNSW team has checked this into the rciti branch
https://github.com/e-mission/e-mission-phone/tree/rk-unsw/survey-resources

Merging it over to master and then using it on the xforms that we got from the enketo toolbox...

@shankari
Copy link
Contributor Author

shankari commented May 30, 2022

npm install fails with

npm install failure
$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated node-pre-gyp@0.9.1: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> node1-libxmljsmt@1.0.0 install /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp http GET https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node1-libxmljsmt@1.0.0 and node@14.18.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
  CXX(target) Release/obj.target/xmljs/src/xml_attribute.o
  CXX(target) Release/obj.target/xmljs/src/xml_document.o
../src/xml_document.cc:190:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("declaration").ToLocalChecked())->IsFalse()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:195:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("format").ToLocalChecked())->IsTrue()) {
            ~~~~~^~~
...
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node" "/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
node-pre-gyp ERR! node -v v14.18.1
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node /Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release --napi_version=8 --node_abi_napi=napi' (1)
npm WARN xform-transformer@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node1-libxmljsmt@1.0.0 install: `node-pre-gyp install --fallback-to-build --loglevel http`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node1-libxmljsmt@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kshankar/.npm/_logs/2022-05-30T05_08_03_473Z-debug.log

It looks like there are no pre-built binaries, we fall back to source compile which then fails.

The survey response code uses transformer v1.31.0; most recent release is 2.1.5.

  "dependencies": {
    "enketo-transformer": "^1.31.0"
  }

Upgrading...

That resulted in a lot of warnings but no errors while compiling gyp.

Successful install logs
$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.9.1: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> node1-libxmljsmt@1.0.0 install /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp http GET https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node1-libxmljsmt@1.0.0 and node@14.18.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
In file included from ../src/libxmljs.cc:7:
In file included from ../src/libxmljs.h:7:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:5272:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
1 warning generated.
  CXX(target) Release/obj.target/xmljs/src/xml_attribute.o
In file included from ../src/xml_attribute.cc:2:
In file included from ../src/xml_attribute.h:5:
In file included from ../src/libxmljs.h:7:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:5272:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
1 warning generated.
  CXX(target) Release/obj.target/xmljs/src/xml_document.o
In file included from ../src/xml_document.cc:15:
In file included from ../src/xml_document.h:7:
In file included from ../src/libxmljs.h:7:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:5272:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
../src/xml_document.cc:190:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("declaration").ToLocalChecked())->IsFalse()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:195:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("format").ToLocalChecked())->IsTrue()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:200:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("selfCloseEmpty").ToLocalChecked())->IsFalse()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:205:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("whitespace").ToLocalChecked())->IsTrue()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:411:50: error: no matching member function for call to 'Get'
    v8::Local<v8::Value>  baseUrlOpt  = options->Get(
                                        ~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:413:50: error: no matching member function for call to 'Get'
    v8::Local<v8::Value>  encodingOpt = options->Get(
                                        ~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:521:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(1, argv);
                  ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:531:23: warning: 'Call' is deprecated [-Wdeprecated-declarations]
            callback->Call(1, argv);
                      ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:542:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(2, argv);
                  ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:577:20: error: no matching member function for call to 'Set'
    info.Holder()->Set(Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ~~~~~~~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/xml_document.cc:612:20: error: no matching member function for call to 'Set'
    info.Holder()->Set(Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ~~~~~~~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
4 warnings and 8 errors generated.
make: *** [Release/obj.target/xmljs/src/xml_document.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node" "/Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release" "--napi_version=8" "--node_abi_napi=napi"
gyp ERR! cwd /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node /Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release --napi_version=8 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node" "/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
node-pre-gyp ERR! node -v v14.18.1
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node /Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release --napi_version=8 --node_abi_napi=napi' (1)
npm WARN xform-transformer@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node1-libxmljsmt@1.0.0 install: `node-pre-gyp install --fallback-to-build --loglevel http`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node1-libxmljsmt@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kshankar/.npm/_logs/2022-05-30T05_07_01_482Z-debug.log
kshankar-35069s:survey-resources kshankar$ rm -rf node_modules/
kshankar-35069s:survey-resources kshankar$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated node-pre-gyp@0.9.1: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> node1-libxmljsmt@1.0.0 install /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp http GET https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node1-libxmljsmt@1.0.0 and node@14.18.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/gagern/libxmljs/releases/download/v1.0.0-mt/node-v83-darwin-x64.tar.gz
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
  CXX(target) Release/obj.target/xmljs/src/xml_attribute.o
  CXX(target) Release/obj.target/xmljs/src/xml_document.o
../src/xml_document.cc:190:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("declaration").ToLocalChecked())->IsFalse()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:195:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("format").ToLocalChecked())->IsTrue()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:200:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("selfCloseEmpty").ToLocalChecked())->IsFalse()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:205:18: error: no matching member function for call to 'Get'
        if (obj->Get(Nan::New<v8::String>("whitespace").ToLocalChecked())->IsTrue()) {
            ~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:411:50: error: no matching member function for call to 'Get'
    v8::Local<v8::Value>  baseUrlOpt  = options->Get(
                                        ~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:413:50: error: no matching member function for call to 'Get'
    v8::Local<v8::Value>  encodingOpt = options->Get(
                                        ~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../src/xml_document.cc:521:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(1, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:531:23: warning: 'Call' is deprecated [-Wdeprecated-declarations]
            callback->Call(1, argv);
                      ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:542:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(2, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:577:20: error: no matching member function for call to 'Set'
    info.Holder()->Set(Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ~~~~~~~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/xml_document.cc:612:20: error: no matching member function for call to 'Set'
    info.Holder()->Set(Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ~~~~~~~~~~~~~~~^~~
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/kshankar/Library/Caches/node-gyp/14.18.1/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
3 warnings and 8 errors generated.
make: *** [Release/obj.target/xmljs/src/xml_document.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/no
{
de_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node" "/Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release" "--napi_version=8" "--node_abi_napi=napi"
gyp ERR! cwd /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node /Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release --napi_version=8 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node" "/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt
node-pre-gyp ERR! node -v v14.18.1
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/Users/kshankar/.nvm/versions/node/v14.18.1/bin/node /Users/kshankar/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt/build/Release --napi_version=8 --node_abi_napi=napi' (1)
npm WARN xform-transformer@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node1-libxmljsmt@1.0.0 install: `node-pre-gyp install --fallback-to-build --loglevel http`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node1-libxmljsmt@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kshankar/.npm/_logs/2022-05-30T05_08_03_473Z-debug.log
kshankar-35069s:survey-resources kshankar$ rm -rf node_modules/
kshankar-35069s:survey-resources kshankar$ ls
Dockerfile	data-json	index.js	run.sh
README.md	data-xml	package.json
kshankar-35069s:survey-resources kshankar$ vim package.json
kshankar-35069s:survey-resources kshankar$ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated node-pre-gyp@0.9.1: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> node1-libxmljsmt-myh@1.0.4 install /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt-myh
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp http GET https://github.com/MrMYHuang/libxmljs/releases/download/v1.0.4-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/MrMYHuang/libxmljs/releases/download/v1.0.4-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/MrMYHuang/libxmljs/releases/download/v1.0.4-mt/node-v83-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node1-libxmljsmt-myh@1.0.4 and node@14.18.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/MrMYHuang/libxmljs/releases/download/v1.0.4-mt/node-v83-darwin-x64.tar.gz
  CXX(target) Release/obj.target/xmljs-myh/src/libxmljs.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_attribute.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_document.o
../src/xml_document.cc:524:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(1, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:534:23: warning: 'Call' is deprecated [-Wdeprecated-declarations]
            callback->Call(1, argv);
                      ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:545:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(2, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/xml_document.cc:581:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    info.Holder()->Set(context, Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xml_document.cc:617:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    info.Holder()->Set(context, Nan::New<v8::String>("validationErrors").ToLocalChecked(), errors.ToArray());
    ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
  CXX(target) Release/obj.target/xmljs-myh/src/xml_element.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_comment.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_namespace.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_node.o
  CXX(target) Release/obj.target/xmljs-myh/src/xml_sax_parser.o
../src/xml_sax_parser.cc:130:10: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(this->handle(), v8::Local<v8::Function>::Cast(emit_v), argc + 1, args);
         ^
../../nan/nan.h:1026:3: note: 'MakeCallback' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
1 warning generated.
  CXX(target) Release/obj.target/xmljs-myh/src/xml_syntax_error.o
../src/xml_syntax_error.cc:68:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    self->errors->Set(Nan::GetCurrentContext(), self->errors->Length(), BuildSyntaxError(error));
    ^~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xml_syntax_error.cc:82:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        array->Set(Nan::GetCurrentContext(), i, XmlSyntaxErrorsSync::BuildSyntaxError(errors[i]));
        ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
  CXX(target) Release/obj.target/xmljs-myh/src/xml_text.o
../src/xml_text.cc:49:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
  info.Holder()->Set(Nan::GetCurrentContext(), Nan::New<v8::String>("document").ToLocalChecked(), info[0]);
  ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
  CXX(target) Release/obj.target/xmljs-myh/src/xml_xpath_context.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/buf.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/catalog.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/chvalid.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/dict.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/encoding.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/entities.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/error.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/globals.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/hash.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/HTMLparser.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/HTMLtree.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/legacy.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/list.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/parser.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/parserInternals.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/pattern.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/relaxng.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/SAX2.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/SAX.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/tree.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/threads.o
../vendor/libxml/threads.c:444:9: warning: comparison of function 'pthread_mutex_lock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
    if (pthread_mutex_lock != NULL)
        ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:444:9: note: prefix with the address-of operator to silence this warning
    if (pthread_mutex_lock != NULL)
        ^
        &
../vendor/libxml/threads.c:513:9: warning: comparison of function 'pthread_mutex_unlock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
    if (pthread_mutex_unlock != NULL)
        ^~~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:513:9: note: prefix with the address-of operator to silence this warning
    if (pthread_mutex_unlock != NULL)
        ^
        &
../vendor/libxml/threads.c:867:14: warning: comparison of function 'pthread_once' not equal to a null pointer is always true [-Wtautological-pointer-compare]
        if ((pthread_once != NULL) &&
             ^~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:867:14: note: prefix with the address-of operator to silence this warning
        if ((pthread_once != NULL) &&
             ^
             &
../vendor/libxml/threads.c:868:14: warning: comparison of function 'pthread_getspecific' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_getspecific != NULL) &&
             ^~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:868:14: note: prefix with the address-of operator to silence this warning
            (pthread_getspecific != NULL) &&
             ^
             &
../vendor/libxml/threads.c:869:14: warning: comparison of function 'pthread_setspecific' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_setspecific != NULL) &&
             ^~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:869:14: note: prefix with the address-of operator to silence this warning
            (pthread_setspecific != NULL) &&
             ^
             &
../vendor/libxml/threads.c:870:14: warning: comparison of function 'pthread_key_create' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_key_create != NULL) &&
             ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:870:14: note: prefix with the address-of operator to silence this warning
            (pthread_key_create != NULL) &&
             ^
             &
../vendor/libxml/threads.c:871:14: warning: comparison of function 'pthread_key_delete' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_key_delete != NULL) &&
             ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:871:14: note: prefix with the address-of operator to silence this warning
            (pthread_key_delete != NULL) &&
             ^
             &
../vendor/libxml/threads.c:872:14: warning: comparison of function 'pthread_mutex_init' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_mutex_init != NULL) &&
             ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:872:14: note: prefix with the address-of operator to silence this warning
            (pthread_mutex_init != NULL) &&
             ^
             &
../vendor/libxml/threads.c:873:14: warning: comparison of function 'pthread_mutex_destroy' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_mutex_destroy != NULL) &&
             ^~~~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:873:14: note: prefix with the address-of operator to silence this warning
            (pthread_mutex_destroy != NULL) &&
             ^
             &
../vendor/libxml/threads.c:874:14: warning: comparison of function 'pthread_mutex_lock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_mutex_lock != NULL) &&
             ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:874:14: note: prefix with the address-of operator to silence this warning
            (pthread_mutex_lock != NULL) &&
             ^
             &
../vendor/libxml/threads.c:875:14: warning: comparison of function 'pthread_mutex_unlock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_mutex_unlock != NULL) &&
             ^~~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:875:14: note: prefix with the address-of operator to silence this warning
            (pthread_mutex_unlock != NULL) &&
             ^
             &
../vendor/libxml/threads.c:876:14: warning: comparison of function 'pthread_cond_init' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_cond_init != NULL) &&
             ^~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:876:14: note: prefix with the address-of operator to silence this warning
            (pthread_cond_init != NULL) &&
             ^
             &
../vendor/libxml/threads.c:877:14: warning: comparison of function 'pthread_cond_destroy' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_cond_destroy != NULL) &&
             ^~~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:877:14: note: prefix with the address-of operator to silence this warning
            (pthread_cond_destroy != NULL) &&
             ^
             &
../vendor/libxml/threads.c:878:14: warning: comparison of function 'pthread_cond_wait' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_cond_wait != NULL) &&
             ^~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:878:14: note: prefix with the address-of operator to silence this warning
            (pthread_cond_wait != NULL) &&
             ^
             &
../vendor/libxml/threads.c:879:14: warning: comparison of function 'pthread_equal' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_equal != NULL) &&
             ^~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:879:14: note: prefix with the address-of operator to silence this warning
            (pthread_equal != NULL) &&
             ^
             &
../vendor/libxml/threads.c:880:14: warning: comparison of function 'pthread_self' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_self != NULL) &&
             ^~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:880:14: note: prefix with the address-of operator to silence this warning
            (pthread_self != NULL) &&
             ^
             &
../vendor/libxml/threads.c:880:14: note: suffix with parentheses to turn this into a function call
            (pthread_self != NULL) &&
             ^
                         ()
../vendor/libxml/threads.c:881:14: warning: comparison of function 'pthread_cond_signal' not equal to a null pointer is always true [-Wtautological-pointer-compare]
            (pthread_cond_signal != NULL)) {
             ^~~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:881:14: note: prefix with the address-of operator to silence this warning
            (pthread_cond_signal != NULL)) {
             ^
             &
../vendor/libxml/threads.c:917:35: warning: comparison of function 'pthread_key_delete' not equal to a null pointer is always true [-Wtautological-pointer-compare]
    if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
                                  ^~~~~~~~~~~~~~~~~~    ~~~~
../vendor/libxml/threads.c:917:35: note: prefix with the address-of operator to silence this warning
    if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
                                  ^
                                  &
18 warnings generated.
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/uri.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/valid.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xinclude.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xlink.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlIO.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlmemory.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlmodule.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlreader.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlregexp.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlsave.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlschemas.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlschemastypes.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlstring.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlunicode.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xmlwriter.o
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xpath.o
In file included from ../vendor/libxml/xpath.c:462:
../vendor/libxml/timsort.h:405:65: warning: comparison of integers of different signs: 'long long' and 'const size_t' (aka 'const unsigned long') [-Wsign-compare]
    if ((stack_curr == 2) && (stack[0].length + stack[1].length == size)) {
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
../vendor/libxml/xpath.c:12409:28: warning: comparison of different enumeration types ('xmlElementType' and 'xmlXPathTypeVal') [-Wenum-compare]
                    } else if (cur->type == type) {
                               ~~~~~~~~~ ^  ~~~~
In file included from ../vendor/libxml/xpath.c:476:
../vendor/libxml/trionan.c:194:1: warning: unused function 'trio_is_special_quantity' [-Wunused-function]
trio_is_special_quantity
^
../vendor/libxml/trionan.c:218:1: warning: unused function 'trio_is_negative' [-Wunused-function]
trio_is_negative
^
4 warnings generated.
  CC(target) Release/obj.target/xmljs-myh/vendor/libxml/xpointer.o
  SOLINK(target) Release/xmljs-myh.node

> libxslt@0.10.0 install /Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/libxslt
> node-gyp rebuild

  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/common.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/crypto.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/date.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/dynamic.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/exslt.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/functions.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/math.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/saxon.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/sets.o
  CC(target) Release/obj.target/libexslt/deps/libxslt/libexslt/strings.o
  LIBTOOL-STATIC Release/exslt.a
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/attributes.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/attrvt.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/documents.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/extensions.o
../deps/libxslt/libxslt/extensions.c:389:18: warning: passing 'xmlChar *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                 BAD_CAST "%s/%s%s",
                 ^~~~~~~~~~~~~~~~~~
/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt-myh/vendor/libxml/include/libxml/xmlstring.h:35:18: note: expanded from macro 'BAD_CAST'
#define BAD_CAST (xmlChar *)
                 ^
/Users/kshankar/e-mission/phone-rciti-branch/survey-resources/node_modules/node1-libxmljsmt-myh/vendor/libxml/include/libxml/xmlstring.h:100:54: note: passing argument to parameter 'msg' here
                                         const char *msg,
                                                     ^
1 warning generated.
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/extra.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/functions.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/imports.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/keys.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/namespaces.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/numbers.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/pattern.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/preproc.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/security.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/templates.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/transform.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/variables.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/xslt.o
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/xsltlocale.o
../deps/libxslt/libxslt/xsltlocale.c:210:1: warning: unused function 'xsltDefaultRegion' [-Wunused-function]
xsltDefaultRegion(const xmlChar *localeName) {
^
1 warning generated.
  CC(target) Release/obj.target/libxslt/deps/libxslt/libxslt/xsltutils.o
  LIBTOOL-STATIC Release/xslt.a
  CXX(target) Release/obj.target/node-libxslt/src/node_libxslt.o
../src/node_libxslt.cc:1:9: warning: 'BUILDING_NODE_EXTENSION' macro redefined [-Wmacro-redefined]
#define BUILDING_NODE_EXTENSION
        ^
<command line>:13:9: note: previous definition is here
#define BUILDING_NODE_EXTENSION 1
        ^
../src/node_libxslt.cc:99:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(1, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/node_libxslt.cc:103:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(2, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/node_libxslt.cc:208:19: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        callback->Call(1, argv);
                  ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/node_libxslt.cc:222:17: warning: 'Call' is deprecated [-Wdeprecated-declarations]
      callback->Call(1, argv);
                ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/node_libxslt.cc:231:17: warning: 'Call' is deprecated [-Wdeprecated-declarations]
      callback->Call(2, argv);
                ^
../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/node_libxslt.cc:226:11: warning: unused variable 'cnt' [-Wunused-variable]
      int cnt=xsltSaveResultToString(&resStr,&len,result,stylesheet->stylesheet_obj);
          ^
7 warnings generated.
  CXX(target) Release/obj.target/node-libxslt/src/stylesheet.o
  SOLINK_MODULE(target) Release/node-libxslt.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN xform-transformer@1.0.0 No repository field.

added 192 packages from 125 contributors and audited 192 packages in 74.984s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

node-pre-gyp was removed as a dependency of node1-libxmljsmt-myh

MrMYHuang/libxmljs@a23214e

But the removal hasn't worked its way down the dependency chain since then

@shankari
Copy link
Contributor Author

Works! In English and Spanish (without translations) no less

English Spanish
Screen Shot 2022-05-29 at 10 55 43 PM Screen Shot 2022-05-29 at 10 56 49 PM

Pending tasks:

@shankari
Copy link
Contributor Author

Let's edit it to be similar to the previous survey to deal properly with save vs. next:

  • remove the UUID field
  • remove the final "estimate of commute time" field since we can get that from OpenPATH
  • turn on pagination

shankari added a commit to e-mission/e-mission-phone that referenced this issue Jun 1, 2022
Original code by @atton16 in
https://github.com/e-mission/e-mission-phone/tree/rk-unsw/survey-resources

Modified and simplified survey from Bingrong Sun
Modified further by @shankari to work with the enketo core
- remove the UUID field
- remove the final "estimate of commute time" field since we can get that from OpenPATH
- turn on pagination

e-mission/e-mission-docs#732 (comment)
@shankari
Copy link
Contributor Author

shankari commented Jun 1, 2022

While ensuring that all the survey code supports spanish properly, ran into an issue where adding translate to the dismiss button in the popup turned it green. This is apparently because it now has an ng-binding associated with it. Using a span instead....

Green button button background transparent overridden by ng-binding class
Screen Shot 2022-06-01 at 8 35 10 AM Screen Shot 2022-06-01 at 8 30 27 AM Screen Shot 2022-06-01 at 8 32 51 AM

shankari added a commit to e-mission/e-mission-phone that referenced this issue Jun 1, 2022
Which includes adding a few additional entries to the i18n file
Everything except the actual survey now shows up properly.
The survey shows up in english first, and the user needs to select Spanish

Let's fix that in a subsequent commit

Note that we had to use a span sometimes to translate to avoid
weird formatting issues
e-mission/e-mission-docs#732 (comment)
@shankari
Copy link
Contributor Author

shankari commented Jun 3, 2022

Finished almost all the spanish translations e-mission/e-mission-phone#836 except that the survey is not initialized to spanish by default even when the phone language is Spanish, and we pass in the language in the options per the documentation https://github.com/enketo/enketo-core/blob/51c5c2f494f1515a67355543b435f6aaa4b151b4/tutorials/10-configuration.md#explicitly-set-the-default-form-language

+    const currLang = $translate.use();
+    _state.form = new $window.FormModule(formSelector, data,
+        {language: currLang});

Poking around this some more, it looks like this is because we are not using the most recent version of the library.

Our version has

	        // before itemset.update
	        this.langs.init();

The most recent version passes in the language.

       // before itemset.update
        this.langs.init(this.options.language);

Before upgrading, and re-testing let's see how we can change the selection on our version.

	var languageModule = {
             	        this._currentLang = this.formLanguages.dataset.defaultLang || languages[ 0 ] || '';
        }

when phone language is spanish, the language array order is ["es", "en"].
Alas, even when the phone language is english, the language array order is ["es", "en"]

Maybe we can change the code to pass in the opts language?

@shankari
Copy link
Contributor Author

shankari commented Jun 3, 2022

Here's the unreleased? patch to override the form language
enketo/enketo-core@c31dccc

Let's apply it to our copy of the forms library and see if it works.
Ans: it does!

@shankari
Copy link
Contributor Author

shankari commented Jun 3, 2022

Final steps left:

  • change the summary and consent from e-mission/berkeley IRB -> OpenPATH/NREL privacy policy
    • with Spanish translations using Google Translate
  • change the default index.html for the container
    • should this return an OpenPATH index file or a 404?
    • let's stick with OpenPATH index file for now since that is what we have in docker

@shankari
Copy link
Contributor Author

shankari commented Jun 5, 2022

Finished the first step in
e-mission/e-mission-phone#837

Tracking second step in
e-mission/e-mission-server#854

@shankari
Copy link
Contributor Author

shankari commented Jun 5, 2022

Merged both steps. Now, let's make the NREL OpenPATH-specific changes in the NREL fork.
Should check with legal on whether we can put them here, or whether we are concerned about making NREL logos available on GitHub.

These changes include:

  • changing the logo
  • changing the app name
  • changing the package name

@shankari
Copy link
Contributor Author

Made all the changes and published a staging version of the app on the stores.

@shankari
Copy link
Contributor Author

While testing, ran into platform issue with iOS12
#735

moving on since that is a corner case

@shankari
Copy link
Contributor Author

shankari commented Jun 11, 2022

Made some other changes:

Going to finish at least an initial implementation of the config feature and then publish the next version.
Tracking initial implementation of config feature in #739

@shankari
Copy link
Contributor Author

shankari commented Jul 8, 2022

Config feature implemented and merged into the https://github.com/e-mission/e-mission-phone/tree/master_for_platform branch.

Ran into issue with scheduled tasks; they are currently built off the emission/e-mission-server.dev.server-only docker image, which installs the entire conda environment every time. This is sort of OK for long-running containers, but not for scheduled tasks which are launched every hour or so.

Tracking this in #752

@shankari
Copy link
Contributor Author

shankari commented Jul 10, 2022

We would also like an improvement to the token generation. For the CEO e-bike program, we had the tokens include the program as a prefix - e.g. stage_ which helps a lot while working with the datasets later. For the NREL OpenPATH app, we have done this for the program tokens, but we have not done this for the autogenerated tokens.

This means that later, we will not be able to as easily distinguish between the NREL commute and open access datasets. Inserting the study name into the token will help there as well.

Unfortunately, since we have already had people join both studies, including some people outside NREL, we need to handle this in a backward compat fashion.

The steps for this are:

  • on the server:
    1. already registered, not yet updated: token will not have study prefix, look it up directly
    2. already registered, updated: token will have study prefix, strip out prefix and look it up
    3. registered after this: token will have study prefix, look it up without stripping out prefix
  • on the phone:
    • generate new tokens with the study prefix
    • at startup, replace non-study-prefixed token with one that has a study prefix

So to summarize the server case where there is a study prefix:

  • if lookup succeeds, use it (cases i and iii)
  • else if token has study prefix, strip it out and look it up (case 2)
  • else return 403

Then, in a month or so, we can remove this hack on both server and phone.

shankari added a commit to e-mission/e-mission-server that referenced this issue Jul 11, 2022
…s not found

This is a backwards compat fix for the issue that we prefix the opcode with the
program name for programs but not for autogenerated study tokens

We will fix this on the phone side, but will need a backwards compat plan for
existing users until their app has been upgraded.

The plan is to keep the server tokens without the study prefix (for now) and to
strip out the study prefix if needed to find the matching token

And once all the phones have been upgraded, we can upgrade the tokens on the
server and be all done.
e-mission/e-mission-docs#732 (comment)

Testing so far:
- Logged in with a valid token

```
2022-07-10 17:37:53,019:DEBUG:123145553195008:Using the skip method to verify id token user-0 of length 6
2022-07-10 17:37:53,024:DEBUG:123145553195008:retUUID = ...
2022-07-10 17:37:53,030:DEBUG:123145553195008:Updating user ...
```

- Logged in with an invalid token

```
2022-07-10 17:47:44,355:DEBUG:123145542684672:retUUID = None
2022-07-10 17:47:44,355:DEBUG:123145542684672:token ... is valid, but no account found. stripping out study name and retrying...

abort(400, "Invalid study format %s, does not end with -openpath" % first_domain)
```

Need to test further on a server with a valid domain name.
shankari added a commit to shankari/e-mission-server that referenced this issue Jul 15, 2022
This is a workaround/stopgap measure until we have the deployer dashboard
working in the NREL hosted version of OpenPATH
e-mission/e-mission-docs#732

Testing done:

```
./e-mission-py.bash bin/debug/export_participants_trips_csv.py -a 2020-01-01 2022-12-31 /tmp/foo
Looking up details for [UUID('a1e8c061-3932-4e9f-8d3a-8102b4c9458b'), UUID('b0a38a40-b03c-462a-9266-f381d3a5390b'), UUID('9d6d309b-b2a8-4a1e-9f94-db6d5dd1cda8'), UUID('user_id_1'), UUID('feba7c0d-33c1-4f5f-8c5a-543b320b09bc'), UUID('93ca26ce-8d8a-4d45-a41d-c6615ab791ab'), UUID('3d9dbd5b-148b-42f3-93bd-a92fa96e7650'), UUID('8e206a0f-4ec4-47d1-95c5-3436f2cf1ec0'), UUID('6076ae51-12a7-4086-9dbd-ea77e8054f78'), UUID('7dbf503c-e559-4af0-a29c-fe541c58d358'), UUID('c56053cb-699f-4a2b-a996-909c3606ddab')]
INFO:root:==================================================
INFO:root:Extracting trip list for user a1e8c061-3932-4e9f-8d3a-8102b4c9458b day 2020-01-01 -> 2022-12-31 and saving to file /tmp/foo_a1e8c061-3932-4e9f-8d3a-8102b4c9458b_trip_table.csv
DEBUG:root:start_day_ts = 1577836800 (2020-01-01T00:00:00+00:00), end_day_ts = 1672444800 (2022-12-31T00:00:00+00:00)
DEBUG:root:curr_query = {'user_id': UUID('a1e8c061-3932-4e9f-8d3a-8102b4c9458b'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.start_ts': {'$lte': 1672444800, '$gte': 1577836800}}, sort_key = data.start_ts
DEBUG:root:orig_ts_db_keys = [], analysis_ts_db_keys = ['analysis/confirmed_trip']
DEBUG:root:finished querying values for [], count = 0
DEBUG:root:finished querying values for ['analysis/confirmed_trip'], count = 0
DEBUG:root:orig_ts_db_matches = 0, analysis_ts_db_matches = 0
DEBUG:root:Found 0 results
INFO:root:==================================================
...
INFO:root:==================================================
INFO:root:Extracting trip list for user user_id_1 day 2020-01-01 -> 2022-12-31 and saving to file /tmp/foo_user_id_1_trip_table.csv
DEBUG:root:start_day_ts = 1577836800 (2020-01-01T00:00:00+00:00), end_day_ts = 1672444800 (2022-12-31T00:00:00+00:00)
DEBUG:root:curr_query = {'user_id': UUID('user_id_1'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.start_ts': {'$lte': 1672444800, '$gte': 1577836800}}, sort_key = data.start_ts
DEBUG:root:orig_ts_db_keys = [], analysis_ts_db_keys = ['analysis/confirmed_trip']
DEBUG:root:finished querying values for [], count = 0
DEBUG:root:finished querying values for ['analysis/confirmed_trip'], count = 512
DEBUG:root:orig_ts_db_matches = 0, analysis_ts_db_matches = 512
DEBUG:root:Found 512 results
DEBUG:root:After de-duping, converted 512 points to 512
...
INFO:root:==================================================
INFO:root:Extracting trip list for user c56053cb-699f-4a2b-a996-909c3606ddab day 2020-01-01 -> 2022-12-31 and saving to file /tmp/foo_c56053cb-699f-4a2b-a996-909c3606ddab_trip_table.csv
DEBUG:root:start_day_ts = 1577836800 (2020-01-01T00:00:00+00:00), end_day_ts = 1672444800 (2022-12-31T00:00:00+00:00)
DEBUG:root:curr_query = {'user_id': UUID('c56053cb-699f-4a2b-a996-909c3606ddab'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.start_ts': {'$lte': 1672444800, '$gte': 1577836800}}, sort_key = data.start_ts
DEBUG:root:orig_ts_db_keys = [], analysis_ts_db_keys = ['analysis/confirmed_trip']
DEBUG:root:finished querying values for [], count = 0
DEBUG:root:finished querying values for ['analysis/confirmed_trip'], count = 0
DEBUG:root:orig_ts_db_matches = 0, analysis_ts_db_matches = 0
DEBUG:root:Found 0 results

$ ls /tmp/foo_*
/tmp/foo_user_id_1_trip_table.csv
/tmp/foo_participant_table.csv
```
@shankari
Copy link
Contributor Author

While investigating an issue reported by a community user,
#689 (comment)
realized that the NREL environment may not have
1b01245
set up

Need to follow up with NREL Ops, and either add it, or reduce the batch size on the phone side.

@shankari
Copy link
Contributor Author

Ah it turns out that it was set to 1G, due to copying over from CanBikeCO.
Phew!

@shankari
Copy link
Contributor Author

shankari commented Feb 5, 2023

We have multiple deployments now; marking this as done and unpinning

@shankari shankari closed this as completed Feb 5, 2023
@shankari
Copy link
Contributor Author

shankari commented Feb 5, 2023

Following up on hack removal in #855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant