Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Installing 1.2.1 error on debian wheezy (Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found) #517

Closed
nsams opened this issue Nov 6, 2014 · 114 comments

Comments

@nsams
Copy link
Contributor

nsams commented Nov 6, 2014

$ npm install node-sass
\
> gaze@0.6.4 install /home/niko/sasstest2/node_modules/node-sass/node_modules/gaze
> node-gyp rebuild

make: Entering directory `/home/niko/sasstest2/node_modules/node-sass/node_modules/gaze/build'
CXX(target) Release/obj.target/pathwatcher/src/main.o
CXX(target) Release/obj.target/pathwatcher/src/common.o
CXX(target) Release/obj.target/pathwatcher/src/handle_map.o
../src/handle_map.cc: In member function ‘bool HandleMap::Erase(WatcherHandle)’:
../src/handle_map.cc:41:26: warning: ‘void NanDispose(v8::Persistent<S>&) [with T = v8::Value]’ is deprecated (declared at ../node_modules/nan/nan.h:612) [-Wdeprecated-declarations]
../src/handle_map.cc: In member function ‘void HandleMap::Clear()’:
../src/handle_map.cc:48:28: warning: ‘void NanDispose(v8::Persistent<S>&) [with T = v8::Value]’ is deprecated (declared at ../node_modules/nan/nan.h:612) [-Wdeprecated-declarations]
CXX(target) Release/obj.target/pathwatcher/src/pathwatcher_linux.o
SOLINK_MODULE(target) Release/obj.target/pathwatcher.node
SOLINK_MODULE(target) Release/obj.target/pathwatcher.node: Finished
COPY Release/pathwatcher.node
make: Leaving directory `/home/niko/sasstest2/node_modules/node-sass/node_modules/gaze/build'

> node-sass@1.2.1 install /home/niko/sasstest2/node_modules/node-sass
> node scripts/install.js

    fetch : https://raw.githubusercontent.com/sass/node-sass-binaries/v1.2.1/linux-x64-v8-3.14/binding.node
progress : [====================] 100% 0.0s

Binary installed in /home/niko/sasstest2/node_modules/node-sass/vendor/linux-x64-v8-3.14

> node-sass@1.2.1 postinstall /home/niko/sasstest2/node_modules/node-sass
> node scripts/build.js

`linux-x64-v8-3.14` exists; testing

module.js:356
Module._extensions[extension](this, filename);
                            ^
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /home/niko/sasstest2/node_modules/node-sass/vendor/linux-x64-v8-3.14/binding.node)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/niko/sasstest2/node_modules/node-sass/lib/index.js:182:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/bin/npm" "install" "node-sass"
npm ERR! node v0.10.29
npm ERR! npm  v2.1.6
npm ERR! code ELIFECYCLE

npm ERR! node-sass@1.2.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the node-sass@1.2.1 postinstall script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/bin/npm" "install" "node-sass"
npm ERR! node v0.10.29
npm ERR! npm  v2.1.6

npm ERR! Uncaught, unspecified "error" event.
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/niko/sasstest2/npm-debug.log

Works correctly: node-sass@1.1.4

$ npm --version
2.1.6
$ node --version
v0.10.29
$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.7 (wheezy)
Release:        7.7
Codename:       wheezy
@kevva
Copy link
Member

kevva commented Nov 6, 2014

cc @am11. Need to compile it on an older system or using GLIBC 2.13.

@am11
Copy link
Contributor

am11 commented Nov 6, 2014

Can we build it on older Linux version as @andrew described in node-sass-binaries issue? I have an exam, can't work on it today :(

@andrew
Copy link
Contributor

andrew commented Nov 6, 2014

I can do it this afternoon
On Thu, 6 Nov 2014 at 12:52 Adeel Mujahid notifications@github.com wrote:

Can we build it on older Linux version as @andrew
https://github.com/andrew described in node-sass-binaries issue? I have
an exam, can't work on it today :(


Reply to this email directly or view it on GitHub
#517 (comment).

@goodspeedj
Copy link

Getting the same error on RHEL6 - latest version of glibc we can install is 2.12

@blittle
Copy link

blittle commented Nov 6, 2014

Having the same problem with Ubuntu 12.04

@andrew
Copy link
Contributor

andrew commented Nov 6, 2014

I've just rebuilt the linux binary using ubuntu lucid and published v1.2.2 but that has resulted in a different error when using the binary:

Error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /tmp/build_1d8dfb2c4c368249b38aacca354b3ed9/node_modules/node-sass-middleware/node_modules/node-sass/vendor/linux-x64-v8-3.14/binding.node)

I don't know how to go about fixing this, ie what kind of linux setup we need to build the binary on

I'm about to go away for three days so someone else will have to pick this up if we want to fix it soon.

@am11
Copy link
Contributor

am11 commented Nov 6, 2014

Damm. I think somewhere we need to fix the compiler argument to make Linux binaries universal.

@andrew andrew mentioned this issue Nov 6, 2014
@andrew
Copy link
Contributor

andrew commented Nov 6, 2014

I'm investigating using the -static-libstdc++ flag

@jacog-cqs
Copy link

Haven't tried 1.2.2 (yet), however got exactly the same issue as @andrew on 1.2.1 (CircleCI environment, not 100% sure on Linux version, but could check if needed)

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.18' not found (required by /home/ubuntu/..../node_modules/gulp-sass/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node)`

@gschwa
Copy link

gschwa commented Nov 6, 2014

Same problem on CentOS

@ohoareau
Copy link

ohoareau commented Nov 7, 2014

Same problem on Debian 7.5

@jchild3rs
Copy link

Same on CentOS 6.5 (only contains symbols up to 3.4.13)

nsams added a commit to vivid-planet/node-sass that referenced this issue Nov 10, 2014
this can be used to workaround sass#517
nsams added a commit to vivid-planet/node-sass that referenced this issue Nov 10, 2014
this can be used to workaround sass#517
@chrisfromredfin
Copy link

Not sure if I'm just playing with fire here or what, but if I install latest version of gcc from this repo:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

I can build node-sass on Ubuntu 12.04. Not sure if this is helpful information toward this ticket or not. :)

@hon2a
Copy link

hon2a commented Nov 12, 2014

I would rather take this bug generally, as @nsams already did in his commit. Having an option to build from source on not-so-easily-updateable machines is a very useful feature regardless.

@am11
Copy link
Contributor

am11 commented Nov 12, 2014

BTW you guys can always refer to our .travis.yml to update GCC: https://github.com/sass/node-sass/blob/de63cd603d363907b7e11734361ad988d5ce49aa/.travis.yml.

@anthonator
Copy link

Seeing the same issue on Heroku.

@anthonator
Copy link

Updating to the cedar-14 stack on Heroku solved the problem.

@laurelnaiad
Copy link

Is there a version of node-sass we can point to that doesn't have this issue? Is 1.2.1 the first to have the problem?

@andrew
Copy link
Contributor

andrew commented Nov 17, 2014

@stu-salsbury 1.0.3 should be ok.

@laurelnaiad
Copy link

Awesome, thanks @andrew. That should save us from a relatively ugly conversation about whether we have to ask all of our customers to yum update RHEL6. Obviously a version-agnostic binding would be super.

@andrew
Copy link
Contributor

andrew commented Nov 17, 2014

I'm hoping the next release will sort that out and you shouldn't need to upgrade, I just need to find some free time to do it!

laurelnaiad added a commit to laurelnaiad/marklogic-samplestack that referenced this issue Nov 17, 2014
Stick to node-sass@1.0.3 to avoid RedHat problem:

"Error: /lib64/libstdc++.so.6: version GLIBCXX_3.4.18' not found"

Watch sass/node-sass#517 for news on long-term
solution.
@mchlbrnd
Copy link

Installing libstdc++6-4.7-dev did it for me. On node version 0.10.33 and npm version 2.1.7.

@QuLogic
Copy link
Contributor

QuLogic commented Dec 27, 2014

@am11: It is perhaps not necessary to have VMs of every single release. You can do something in mock in the latest Fedora, e.g., with Fedora 21 here:

$ sudo yum install mock
$ mock -r epel-6-x86_64 --init
...
$ mock -r epel-6-x86_64 --install npm
...
$ mock -r epel-6-x86_64 --shell
<mock-chroot>[root@quorum /]# npm --version
1.3.6
<mock-chroot>[root@quorum /]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 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.

And voila, (nearly) instant old version of gcc. (Note the shell for mock'ed chroots is limited, so it's best to prepare everything you want, and mock -r epel-6-x86_64 --copyin a tarball, and extract it in the chroot.)

Then after compiling in mock, copy it out to your real Fedora 21 and test there. Or, mock a different release from there.

@am11
Copy link
Contributor

am11 commented Dec 27, 2014

Great! Mock that is then! Working on #586 with @txdv over IRC. After that I will try out Fedora 21 (last time I used Fedora it was at v11, and v12 was just released!) :D

Thanks for the tips! 👍

@nsams
Copy link
Contributor Author

nsams commented Dec 28, 2014

Seems to be working on debian wheezy. Thanks a lot!

@am11
Copy link
Contributor

am11 commented Dec 29, 2014

Great! So that concludes it. :)

@ghasolutions
Copy link

I see this is closed and its not my intent to re-open it. Rather I wanted to share that the above thread was very helpful in allowing me to get grunt-sass installed on CentOS6.5 using Vagrant Chef. This is the sequence of commands that worked for me:

# Get the CERN labs dev toolset which contains gcc 4.8
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo

# import the CERN PGP key
rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern

# install the various gcc libs
yum install devtoolset-2-gcc.x86_64
yum install devtoolset-2-binutils.x86_64
yum install devtoolset-2-gcc-c++

# force npm to use the 4.8 libs
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=1 CC=/opt/rh/devtoolset-2/root/usr/bin/gcc CXX=/opt/rh/devtoolset-2/root/usr/bin/g++ npm install grunt-sass

@ralberts
Copy link

ralberts commented Jan 8, 2015

Thanks so much @am11!!! I just came across this error today and amazed you fixed it just 14 days ago! Woohoo! Doing "npm install node-sass@2.0.0-beta" worked for me on CentOS 6.5 / GCC 4.4.7.

@saper
Copy link
Member

saper commented Mar 31, 2015

Got

Error: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.18 required by /usr/local/lib/node_modules/node-sass/vendor/freebsd-ia32-14/binding.node not found

today when testing my fresh i386 binaries for FreeBSD. Here's why:

  • the binding (and the sass/libsass, too) were compiled with non-system g++48 is linked to the libstdc++.so.6 shipped with g++48:
# ldd /usr/local/lib/node_modules/node-sass/vendor/freebsd-ia32-14/binding.node
/usr/local/lib/node_modules/node-sass/vendor/freebsd-ia32-14/binding.node:
        libstdc++.so.6 => /usr/local/lib/gcc48/libstdc++.so.6 (0x285b2000)
        libm.so.5 => /lib/libm.so.5 (0x281ad000)
        libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x281c7000)
        libthr.so.3 => /lib/libthr.so.3 (0x281e3000)
        libc.so.7 => /lib/libc.so.7 (0x28091000)

However, this runtime path information seems to be not used when node dlopen()s the binding:
and tries to use system's (outdated) /usr/lib/libstdc++.so.6 instead of compiler's /usr/local/lib/gcc48/libstdc++.so.6.

The reason why things start working after some system upgrade is that the system probably is getting an upgraded libstdc++ library.

Will try to investigate whether we can influence runtime linker better.

vladistan pushed a commit to vladistan/marklogic-samplestack that referenced this issue May 2, 2019
POC browser tier

post-POC changes to java/database tiers

Port of post-POC changes from separate repositories

post-POC changes to browser tier

Port of post-POC changes from separate repositories

using bulk read

more verbose for dbInit task

broke something

testing search

Just cleanup and javadocs, renames

seed-data update

added title index for alpha sort

database cleanup

fixed typo

Tags

Voting implemented

Voting, web side

Markdown formatting

refactoring, checkpoint

data integrity for username on insert

Reputation implemented

related tags extension

slight testing improvements

slight testing improvements

fix(style): adapt jscs settings

Adapt .jscs settings to new schema.

chore: remove dupe features

chore(require.js): convert (back) to require.js

chore: restore unit testing

html/scss: semantics and wireframes

Add html to implement main states of the application as per wireframes.

Use semantic class names to define structure.

Use scss, primarily @extend to connect html to bootstrap classes.

Customize scss to match wireframes.

database: create forest

Configure the samplestack db with valid forest specification.

Closes #72

refactor checkpoint

README update

Fix authentication on /questions /search /tags #85

appRouting: naming conventions to support views

statesHierarchy may not use views and have their template and controller
names inferred from the hierarchy.

TODO: document algorithm for developers

chore: clean up/clean out old code

unit tests: testHelper -> AMD

Expose testHelper as AMD module.

unit tests: organize suites

chore: remove unused tests

Added mocks, tests NOT passing yet

assertion errors with mocks)

Tags for the no-query case

closes #89

Seed data Update

Refactored intregration and unit tests

Transform JSON changes to keep up with server

appRouting - remove hierarchy definition shorthand

Using shorthand to define states hierarchy has been found to be
confusing to new developers. Remove shorthand and associated
interpretation code.

chore(dependencies): update ui-router, angular-mocks

chore(test): allow xit from .jshintrc

.jshintrc configured to accept sit function from mocha to enable
unit tests to be set to pending.

chore: cleanup dead code

chore: dependencies by directory index

Organize dependencies on components and tests by directory index files.

chore: add e2e mocks $httpBackend capability

Enable running the app with a mocked REST server.

Session and response codes correct

tests with POST and form params

Checkpoint for login data

security implemenation concerns

Role information in login payload

Checkpoint - csrf DISABLED

CSRF enabled, working

change server root context to /v1, change port. 

Closes #106, #75

return profile information with login. 

closes #109

Dont try to set csrf if there is no token

assertion fix, role in array

browser: only run the app from index.html

Running the app in unit tests causes it to attempt to load template
files and do other things we don't wish to do at test start.

Move the running of the app module back into index.html so that it is
not run in unit tests.

browser: update angular, angular mocks

fix: bootstrap font icons path

remove old scss code

browser: proxy to REST server in development web server

In dev build web server, proxy all requests to '/v1/' to the REST
server's configured URL.

work around jsonschema version in npm (fix)

The version of jsonschema that is coming out of npm is fouled up.

Reference the repository at the current commit in package.json, instead.

browser: update node dependencies

Update all dependencies that are non-breaking changes.

In addition, gulp-rimraf is deprecated. Replace with del.

browser: main-bower-files instead of gulp-bower-files

gulp-bower-files is deprecated. Use main-bower-files instead.

browser: restore and upgrade jsonschema

jsonschema npm database has been corrected. Restore reference
to gold-source and point to version 1.

browser: pin dependencies whose upgrades break build

Upgrades to gulp-filter and through2 break the build. Pin their version
numbers in package.json until root cause is addressed.

browser: build environment stability improvements

Improve stability of `gulp watch` with respect to error recovery.

1) rearrange jscs to run once per file, and ensure that is is "plumbed"
with gulp-plumber.

2) improve logic of restarting the watch and rebuilding the entire app
so that the watch doesn't crash and so that full rebuilds are executed
on the next save after a build error.

3) node-sass is crashing the build when it is attempting to make source
maps and encounters a syntax error.  The crash is a segfault and there
is no opportunity to catch the error.  The process exits ungracefully.

As such, create buildParams.sassCompiler property to allow developer to
choose between the lesser of evils.  See comments in buildParam.js
for more information.

Also plumb gulp-sass "more better" so that its errors are handled
when they can be.

Warning: At present. the buildParams.sassCompiler = 'ruby-sass' option is
experimental and is not likely to work yet.

Note: The code changes in this commit reflect the general "draftiness"
of the build script. This script will be overhauled when time permits.

4) improvements to speed of build environment.

browser/deps: use ui-router snapshot

Use ui-router snapshot to enables optional query string parameters.

browser/utlitiy

Add mlUtil for deepExtend and moment for date parsing and formatting.

browser/states: remove store state

Remove the store state because it is unnecessary.

chore cleanup

checkpoint -- not working

doc patch working for answer

change to samplestack admin username

fix tests for partial refactor

security bug with search 

 issue #112

put csrf header back on session

move to public java-client-api repo for builds

Windows Path modifications

Disable csrf again

Windows-proof configuration

dbload has path separator issue for document uri

test update for security

Issue #105 /logout returns 302

dbload on windows

remove utf-8 seed data

java/search: allow start as object property

Allow start to be specified on the root of the posted object as an
alternative to using the query string parameter.

Encoding issue with dbload on windows

cleaning dbpedia

README update and Javadoc delivery (partial)

browser: dialogs and dropdown for authentication

Add contributor dialog to display contributor detail.

Add login dialog.

Add account dropdown for logged in users.

feature(auth): support for id/authentication/authorization

Changes to the webapp:

* login dialog
* account dropdown for when logged in, can logout from dropdown
* contributor dialog for popup information about contributors
* initial webapp code documentation via dgeni, using a modified
version of Angular's dgeni app and configuration
* clear up and expand browser/README.md

Additionally,

* overhaul data/model handling in the browser app
* begin to clean up specs/features

browser/build: use straight browserify instead of gulp-browserify

By using regular browserify, hope to avoid `npm install` problems
seen on Windows for installation of gulp-browserify as devDependency.

browser/general: update READMEs, esp. regarding node/npm issues

Remove outdated/extraneous instructions from main README. Point to
browser/README.

IN browser/README.md:P

* add path context to commands
* add instructions related to not using Cygwin
* add instructions related to global packages path
* add instructions related to older npm versions

browser/docs: do not generate docs

Don't generate docs within this repository.

TODO: make docs generation locally accessible to those who need it.

browser/build: windows SASS build

gulp-sass is problematic in windows with sourcemaps enabled.

Disable SASS sourcemaps in Windows environment until gulp-sass is fixed.

browser/readme: remove instructions for docs generation/viewing

We will generate and publish docs outside of the repository, so remove
mentions of the feature to generate and view the docs from within
the browser development process.

browser/build: close active servers on SIGINT

When process received SIGINT, close all port listeners.

browser/build: attempt to catch gaze errors

The component that watches for file changes sometimes throws errors
when directories change during watch mode.

Attempt to catch errors from both instances of gaze.

browser/build: avoid prepending slash for phantomjs unit tests

PhantomJS unit tests don't like to see slashes prepended to paths.

In linux this was causing an error loading a dependency.

Remove alias for the deps directory that was using a slash prefix in its
path.

browser/build: remove slash from app definition of reps path

The app module was overriding reps path when combined with the marklogic
module.  Remove path definition to reps from apps as well.

Also eliminate stray path to rectangular which has been excised.

browser/build: make moment global

Linux version of phantom for unknown reasons seems to be unhappy
finding moment unless it is required up front. Define moment
on window in deps.js to workaround.

java/deps: point to marklogic java client api EA2-RC1.

The snapshot for the Java client disappeared. Point to EA2-RC1.

Allows ./gradlew assemble to work and to find the latest version of
the client api.

readme: update instructions for ea2

Javadocs

ID mapping for qnadocument GET

Update for Java EA-2 release

database: seed-data additions/changes, cleanup

* add a lot of seed-data from @grechaw
* tweak the seed-data to expose more functionality
* pretty-print a few key database config files

feature(explore): initial implementation

Enable the user (contributor or visitor) to search, filter and browse
question-and-answer documents.

Filters are designed to support "shadow queries".

Beginnings of the "view-qna-doc" feature -- support rendering of
documents and accurate vote handling. No dynamic features of this
state are yet included.

Limitations include:

* cannot filter by date range
* cannot filter by "resolved only"
* all tags dialog does not have the intended data and is presently
disconnected

Also includes

* a relatively major layout overhaul, moving aware from using bootstrap
to control layout.
* many various fixes and improvements

browser/fix: fix paging so that last page can be reached

browser: spinner while loading

If a state sets a loading flag on the scope, then show a spinner and
suppress visibility of everything else but the app title until the
state removes the flag or an error occurs.

browser: be safe about cookie reading and writing

Avoid throwing errors if invalid data is going into or coming out of
the session id cookie.

Closes #157

browser/search: valid range criteria

Send valid range criteria to marklogic.

Configure ssSearch to match db configuration.

README updates

dbload skipped for appserver task issue #128

browser: set ea2.rc1 in package.json

browser: pin gulp-mocha-phantomjs

gulp-mocha-phantomjs has two issues:

* it "^" depends on moch-phantomjs which caused it to pick up an
incompatible version
* the author deleted the tag for version 0.3.0

So:

* hardcode a dependency on mocha-phantomjs at 3.3.2
* revert to a fork of gulp-mocha-phantomjs that works as expected

New constraints, test for value constraint boolean #146

browser: add "show resolved only" to explore

Allow contributors to search for only resolved qna-docs.

README update

Remove data (for ea2) that Windows can't load right now

fix(unit tests): avoid chai's should on numbers

Chai's should assertions are failing to function on IE9.

Switch each failing usage to `expect` syntax which should work
the same universally.

This addresses part of issue 169.

browser: angular's to/from Json instead of manual conversion

In order to determine what parts of an object are "jsonifiable",
convert the object to/from JSON.  This avoids use go getOwnPropertyNames,
which seems to be behaving differently in different browsers.

browser/fix: fix tags typeahead

browser/documentation: add docs to directives

browser/documentation: add documentation to ss- dialogs

browser: reflect that which is incomplete with yellow

browser: attribution to stackoverflow

TODO: need an icon for the link out to individual questions.

browser: revert to simple counts for selected tag constraints

For tag constraints that are selected (i.e. being applied), show
the number of documents returned by the search as per wireframes.

browser: set ea2 in package.json

browser: add instruction for ~/.npm problem on osx

Instruct user how to handle cases where they have ~/.npm directory
access issues.

README update #177

browser: use request for proxying

Switch to mikeal/request to proxy for rest server.  "proxy/middleware"
was unstable.

chore: remove files not in use

Remove some files that we don't yet use.

README update, and delete scripts dir

chore: browser/dev-tasks README update

Provide message that the build process isn't intended to be modified
by developers in EA2.

README update

README edits

chore: readme update for two terminal windows

chore: clarify stop/restart instructions

chore(browser build): remove old bower components

Remove stray references to bower components that we have chosen not
to use.

chore: clarify stop/restart instructions

issue #180 admin and rest boot

Remove seed data

use java client bulk write for slurp

Issue 149 maryAdmin login

Pojo facade refactor

Patch refactor, incomplete

Cleaning and tests for Pojo-refactor

refactor groovy

dbload with new data

laod roles in order

Remove slashes from IDs

bugfix for updated java api

Tighter initialization delay loop

remove error-format property from configuration

anonymous can't see /v1/contributors issue #154

Added git ignore for database

POJO Facade update

date facet

date facet and test improvement

testing improvements and cleanup

Search Refinements

search-response transform

Bucket refinements, reputation transform

chore: data cleanup, imports

chore(build): overhaul dev-tasks

Refactor dev-tasks:

* unlock and update dependencies, address changes to them due to those
updates
* improve maintainability/readability
* improve efficiency
* consolidate process-level variables and functions into `context`
object
* miscellaneous fixes

chore(deps): update angular and related to 1.3.x

Angular 1.3.x has many improvements. The driving factor in upgrading
is the potential to improve rendering speed of repeaters.

rc.0 introduced some changes:

* baseHref is required but not available in mocks. This is an angular
bug. Work around it by decorating the $browser service to supply it.
* It seems to require html for directive templates even if they aren't
needed by the tests. Respond with actual directive template html when
it is requested to keep angular from throwing an error.

feat(filter-date-range): Explore Docs by Date Range

Enable filtering and faceted search of date ranges by last activity date.

This commit also includes refactoring and other supporting changes:

* mlUtil: date helper functions — subject to change based on design
around time zones;
* overhaul faceted search (support shadow configuration within mlSearch);
* authRestored -> `appInitialized` promise to resolve in `layout` state --
simplifies and hardens process of ensuring the application is ready when
first loaded or refreshed, including that we have restored an active session
if there is one;
* rewrite explore state (and add new exploreResults state) to better
handle state, routing and events;
* minor css changes;
* watch specific directories in dev-tasks so that other directories under
dev-tasks do not cause an extra watches

browser: ngdocs

Add substantial ngdocs for API and removed unused components.

feat(sort docs list): sort documents in explore state

Documents can be sorted by score, activity date or relevance

node: .gitignore node_modules

browser: unit test fixes for search sort capability

Incorporate the presence of a sort specification into tests for the
search feature.

browser: unit test changes for new app initialization

App initialization now generalized so as not to be tied specifically
to restoration of a session. Make the corresponding changes to unit
tests.

browser: qnaDoc `body` properties -> `text` properties

`body` properties in qnaDoc objects have been renamed to `text`.

Render the appropriate property in the qnaDoc and searchResult views.

browser: refactor buildParams.js -> options.js

- change name of buildParams.js to options.js.;
- refactor options for clarity
- document all options;

browser: changes for new qnaDoc/search APIs

browser: update README for new coverage port

In consolidating ports, that used for unit test coverage reporting
was changed. Update README to reflect new port (3002).

Rework database context

Renamed MarkLogic Implementation

Spring context refactoring and cleaning

Serve /v1 explicitly to make room for webapp in same container

Add IDEA plugin

To easily allow project creation for IntelliJ IDEA.

Ignore also IDEA project/module artefacts

Added IntelliJ IDEA project and module files to be ignored.

Tags implementation, partial

Security: moved privileges to role payloads

Patch bug fixes Issue 212

chore: remove unused options, change maven url

attempt upgrade

Upgrade to gradle 2.1 issue #215

README update

Code version updates

Provide more graceful teardown failure

Search response using snippets

remove log statements

Tests are idempotent, tags are implemented

Has Voted Service

chore: moved packages, clean warnings

dbLoad is never up to date

browser: initialization service for on module.run

Move initialization of $rootScope functions into an `initialize`
service so that they are the very first code run when the
application starts. Inject appRouting in `initiazlize` instead
of on module.run.

browser: error on invalid data from server

These changes are intended to ensure that only sessions with valid
metadata are engaged in the browser. Since we do not get back a session
id, there is no way to communicate to the middle tier that we are
rejecting a session.

TODO: fix the Java /v1/login endpoint (#224) and then verify proper
end-to-end functionality.

In mlModelBase,

* in assignData, use this.mergeData instead of mlUtil.merge, and
do not double-call this.testValidity

In mlAuth,

* in authenticate, reject if invalid data received
* in restoreSession, do not restore an invalid session

In login dialog,

* create a clean sesion object on rejection, copying user name, so that
future login attempts are allowed (i.e. we don't have a half-baked
session object
* remove runtime error message once the user starts to reattempt login
by entering password text

feat(e2e): first draft of e2e testing with Java stack

* make `browser` a global object for jshint so protractor code doesn't
look like it is broken
* force angular dependency to resolve to 1.3.0 in bower
* add relevant dependencies to package.json for e2e testing
* suppress superfluous console log messages for e2e gulp task
* configure specific browsers to run in e2e tests on sauce (TODO: make
tests for IE9, IE10 runnable)
* set up `reports` directory for test results
* increase timeout in browser to 10 seconds for slow middle-tier
startup (#213)
* change rendering of "questions count" in explore state to ease e2e
testing

Closes #213, marklogic/samplestack-internal/issues/117

browser: ssQnaDoc enhancements

In mlModelBase:

* add optional parent param to constructor and associated
functions;
* getBaseUrl prototype function to correct handling of the
property for instances vs. prototypes;
* assignData uses mergeData instead of mlUtil.merge;
* support for `additionalPromises` to be resolved in the context
of an http-based function call;
* http function lives in prototype for overrideability;
* ensureInstance is expose as public function on svc so that it
may be overwritten if needed

For ssQnaDoc:

* break out portions of instance into prototyped subobjects:
ssAnswer, ssComment;
* support for knowing whether or not a contributor has voted on
a content object (ssHasVoted)

browser: ssMarkdownEditor improvements

Due to binding bug, do not use Bootstrap tabs, instead create our own.

Style tweaks

Closes marklogic/samplestack-internal#87

browser: don't reference gulp-ruby-sass

node-sass is now stable, so we can remove code used as a workaround.

chore(readme): specify ML nightly from 10/24 in README

store joeUser and maryAdmin at startup

Seed data loading everything with guest permissions.

fix permissions setting in dbload

update seed data version

chore(readme): provide link to seed-data

java: convenience .sh script for full gradle run

cleanstart.sh downloads the current seed data and does a full, clean
setup of the Samplestack Java tier and finishes by launching bootrun.

It is not expected to work on Windows. In the future, a cross-platform
solution may be developed in gradle.

For now, it represents the expected path for successful launch of the
Java stack after retrieving the code from git (minus all browser-related
commands).

It should work for a clean install and for a reinstall.

feat(java/cleanstart.sh): use ConfigureClean, ignore server cert

Add dbConfigureClean task to the cleanstart.sh script.

Allow curl to ignore certificate trust issues for seed-data download.

browser: incorporate ssAnswer, ssComment into qnaDoc state

Commenting and answering is functional subject to unit test work.

fix outgoing links for SO questions and users

Updates for Java Snapshot

README update

issue \#230, v1 missing from hasVoted

java: improve cleanstart.sh

Use curl/mlvm to install MarkLogic nightly. User may specify nightly
date as parameter or it will attempt to use today's nightly. Fails
if nightly not found.

Various workarounds for environmental instability.

TODO: remove MarkLogic Data directory in Linux.

browser: update to angular 1.3.1

browser: update npm dependencies

browser(dev-tasks): update gulp-watch API calls

gulp-watch API changed, use new API.

e2e: improve e2e resiliancy

Changes to make e2e tests more likely to succeed in setting up
middle-tier and executing on SauceLabs.

e2e: cleanstart.sh tweaks

Add messaging, exit on certain failures, fix bugs.

This script is only useful on OSX. It represents a path that is more
likely than some others to yield a working build and "clean start".

Note that while it won't work on other platforms, its alogorithm
should work and were it built into a Gradle task may be a decent
method of ensuring a clean installation.

At this time, dbTeardown is skipped in favor of **wiping out the
Marklogic/Data** directory, which means that if you run this on your
MarkLogic 8.0 installation, you will lose all of your data.

chore(README): update nightly compatibility

Specify 20141107 build of MarkLogic 8.0 as dependency.

fixes issue #222, creates roles in correct order

Fixes issue #237 schema updates, and critical stopage #235

bug:223 tests have no side effects

fix(e2e): do not run dbConfigureClean separately

Do not run dbConfigureClean before dbInit because it is included *in*
dbInit.

e2e/java: cleanstart: use dbTeardown instead of wiping out ML data

Now that server isn't sending HTML errors and gradle isn't choking on
them, we can use dbTeardown to wipe out only the Samplestack
configuration on the MarkLogic server instead of deleting the data
directory.

This makes for less upheaval in the user's environment.

Also clean up and add comments to the script.

chore(readme): update instructions for nightly, add note on cleanstart

Instruct developers to download/use the latest MarkLogic 8.0 nightly.

Make mention of cleanstart.sh script for detailed steps which are being
tested daily and expected to provide a working middle tier, with caveat
that the script will only be functional on OSX.

chore(gitignore): ignore browser/dev-tasks/e2e/protractor.conf

The protractor.conf file is created during e2e tests and should not be
in version control, so add it to a .gitignore file.

login/logout moved to /v1/session

issue #231 new get session endpoint for logged in user

fixes issue:220, non-existent question id should be 404, not 500

e2e: cleanstart: do not run if not OSX and/or no mlvm install

Echo error and exit if either not OSX or mlvm command not present in
shell.

browser(authentication): use new endpoints

Endpoints now consistently use 'session' for URL.

Remove overrides to endpoint addresses, make corresponding changes to
tests, and fix schema/validation and response-handling bugs.

accept empty comment and answer objects for ask issue 241

browser: updates to package.json

browser: update to angular 1.3.2

browser: update to gulp-sass 1.2.3

Fixes issue with node-sass not compiling on npm install.

Always check for Client API shapshot during devel

e2e: update to protractor 1.4.0

e2e: various improvements

e2e is now usually functional on SauceLabs. Still working out stability with respect to test timeouts on Sauce.

spawn gulp using full node <pathtogulp.js> syntax

browser: upgrade gulp-watch, new way to be silent

gulp-wactch first dropped the `silent` option and then restored it as
`verbose: false`. Update to the new version and switch to
`verbose:false`.

browser: fix typo in livereload port option

browser: do not always scrollTop on locationChange

Do not always scroll to the top of the page when we have a location
change event.

Also, move initialization of non-routing-related $rootScope properties
to initialize service.

browser: cleanly handle termination of servers and external processes

Use callbacks and events to better ensure that servers and external
processes are shut down prior to exiting or restarting gulp tasks.

fetch and extract tasks part of issue 233

e2e: cleanstart: allow dbLoad to fetch/extract seed data

browser: stick on phantomjs 1.9.7 due to security bug

https://github.com/ariya/phantomjs/pull/12720

Note: **npm package** phantomjs 1.9.11 is last to use phantomjs
binary 1.9.7.

browser: fork gulp child process instead of spawning

Fork child worker process instead of spawning in order to maintain
better control of gulp restarts which must occur when the automation
code itself is modified, and in order to maintain a controlled exit
where other servers/processes must be shut down/restarted themselves.

e2e: cleanstart.sh:  separately call seedDataFetch/Extract

Individually call seedDataFetch/Extract gradle tasks in anticipation
of them not being automatically run by dbLoad.

browser: suppress express deprecation warnings

Deprecation warnings are originating from istanbul-middleware.

Suppress all express warnings.

e2e: watch/restart cleanup

search tips working without real content

use ng-show instead of ng-hide, consistent with var name

browser: make ask state functional, tags input is still in progress

browser: make voting and answer acceptance functional

Includes some renaming of variables in mlModelBase.js
Voting methods are removed in ssContributor.js because similar methods are defined in ssQnaDoc
Includes simple tests for hasVoted functionality

e2e: cleanstart: restore dbTeardowm

dbTeardown is working for the moment, so use it instead of nuclear
deletion of MarkLogic data directory.

browser: hard-wire node-sass 1.0.3

Stick to node-sass@1.0.3 to avoid RedHat problem:

"Error: /lib64/libstdc++.so.6: version GLIBCXX_3.4.18' not found"

Watch https://github.com/sass/node-sass/issues/517 for news on long-term
solution.

browser: save reference to istanbul by `port` rather than `"istanbul"`

By using `port` to hold a reference to running istanbul servers, we can
control them independently.

browser: display correct port for app in `gulp run`

Render correct option for port of web application in `gulp run` menu.

browser: `gulp run` (re)starts servers after tests

`gulp run` startts web app, unit testing and coverage servers after
unit tests are complete.

browser: pre-install lodash so that it is available on time

npm bug seems to be causing install/postinstall scripts to run before
all dependencies are available. In particular, lodash is not available
for sauce-connect-launcher's script.

Use a preinstall script to instigate npm install of lodash to ensure
it is ready before install/post-install time.

Track these issue for long term solution:

* https://github.com/bermi/sauce-connect-launcher/issues/42
* https://github.com/npm/npm/issues/6624

browser: load highcharts up front

Load highcharts.js as an initial dependency to work around Linux issue
with availability when loading explore state.

browser: remove unused file

browser: normalized paths and backslash-compatible regexes

Normalize all paths for host OS.

For regexes involving paths, match against forward or backward
slashes.

browser: remove console.log statement

e2e: move Sauce credentials out of source code (part 1)

Move SauceLabs credentials to credentials.js, and establish means
to read from that file or environment variables.

TODO: .gitignore credentials.js in a part 2.

e2e: move Sauce credentials out of source code (part 2)

.gitignore credentials.js so that modifications to the file are not
pushed/pulled into version control.

e2e: move Sauce credentials out of source code (part 3)

Fix path to credentials.js in .gitignore.

e2e: (re)allow reporter overrides

browser: allow for ML requirement that JSON keys be ordered

MarkLogic server REST validation presently requires that JSON keys
for search constraints be in a specific order, which is the reverse of
the order the browser was sending.

Reverse the order so as not to trigger validation errors from the
server.

e2e: local selenium starter fixes

* determine the correct path to selenium jar by search rather than
by protractor's configuration;
* do not attempt to parse an already parsed url;
* fix arity of seleniumLocal starter function so that it expects
(the console) args as the first argument and the callback as the
second argument.

e2e: cleanstart: flag stacktrace to enable dbTeardown failure analysis

e2e: defaults for `gulp e2e`

`gulp e2e` with no additional parameters defaults to:

* middle-tier=external
* browser=chrome
* selenium=local
* sauce=false
* to-file=false
* reporter=pretty

In other words, by default e2e tests are run against Chrome with local
selenium and assume that a middle tier is already running.

The report is written to the console only, and is in verbose
cucumber style ("pretty").

e2e: initial explore-by-tags .feature file

Create a few stub e2e scenarios for the explore-docs-by-tags feature.

browser: updates to account dropdown, contributor modal dialog

make display consistent with wireframes (votes cast, etc.)
fix associated tests

browser: updates to voting, vote acceptance

move vote-related logic from controller to model (ssAnswer, ssQnaDoc)
update button styles to be consistent with wireframes
make voting update the user's votes cast

browser: require user to be logged in to answer questions

browser: add icon for linking to stackoverflow.com

browser: remove mocks from application itself

Somehow, stray references to the mocks crept into the appliction.

Remove them so that the running application (as opposed to the tests)
doesn't rely on the mocks.

browser: tweak README

Tweak README.md for

* readability;
* improved documentation of when and when NOT to use elevated
privileges;
* add note on re-trying npm install due to recently-surfaced npm
timing bug;
* improve instructions for OSX users regarding ~/.npm directory.

browser: change "score" to "votes" in UI

"score" is confusing in a MarkLogic demo app because it has a specific
meaning with respect to search relevance. Use "votes" so that it is
clear that this isn't a relevance score.

browser: if stateParams.page is already a number, do not fail

If stateParams.page is already a number in explore state, do not attempt
to trim it and parse it. Fixes paging.

browser: show spinner in results area when searching

When a search is under way, set results count to zero and show a
spinner, but leave the header in place so that the sort controls
remain visible.

browser: emit criteria change if page is incremented/decremented

If incrementPage returns true, emit criteriaChange to trigger a new
search.

Changes to search, incporporating snippets and reputation.

fixes issue 156, catching failed requests and sending 400 to the browser

fixes page length issue with document search 226

use remote seed data 1.4

indexes and options for votes and answers

Fixes issue with PR 261

Fixes issue #271, changes score name to votes

e2e: pre-run dbInit

Run dbInit before dbTeardown in case server hasn't been initialized.

browser: sort by score not votes

Use the 'score' sort for search rather than 'votes'

browser: bug #178 handle any undefined facets in search results

When processing search results that did not have matches, the server may respond without facetValues for some facets. In these cases, create an empty array of facetValues so that the algorithm for processing them does not fail.

browser: mark search bar on QnaDoc page as incomplete

QnaDoc page search bar is not functional, mark incomplete.

browser: sort QnA doc content, commenter name display

Consistently sort accepted answers to top.

Display commenter user name on answers.

browser: search from QnA doc

browser: proper voteCount in search results

chore: transoform cleanup

Add digit to Marys guid, clean tests, fixes #149

New searches user, askedBy, answeredBy, commentedBy

Fixes 500 coercion error in searches issue #274

period on date historgram

Added test for default lastActivityDate sort

Fixes issue #267, skip comment for update to lastActivityDate

Turn gradle daemon of by default

README updaet for issue #149

browser: simplify handling of content owners

Remove complexities of handling content owners that were remnants of
previous versions of seed-data. Make UI consistent with respect to
missing reputation values.

browser: if page number isn't specific in state parameters, it is 1

When assigning state parameters/handling URLs, if no page number is
specified, set it to 1 in the search object so that navigation which
lacks page number indicator returns to the first page of results.

browser: do not choke on negative reputation

If reputation is less than zero, it is treated as valid and the browser
doesn't prevent log in or representation of the number in the UI.

browser: page not ouf of bounds if 0 results

It is not possible for page to be out of bounds when there are 0 results
in a search. Never try to force a change to the page number if 0
results are found in the search.

browser: update ui-router to 0.2.13

browser: add snippets in search results

includes adding ID anchors in QnaDoc for snippet linking
add search-mode checks to support correct snippet display

browser: scroll to relevant content from snippet link

browser: round up to month and format as expected for date range dctv.

Round up to the next month in date facet results and format the data
for use by the date range directive.

Fix highcharts formatting relating to bar width and date picker text
box rendering.

README update for cleaning

Link to seed-data1.5.tgz on developer.marklogic.com

browser: add search tips to container in explore, see issue #121

test assertion modification

Change to handle null owner in single-question javascript transform fixes #312

Hard codes periods to by month.  adjusts beginning of month by one day. fixes #124 for EA-3

joins reputationfor comments and answers, fixes #225

browser(unit): update search response for date values

Date values in facets are now ISO Date strings. Update mocks in tests
to reflect updated format.

browser: do not round up dates

Date facet values are now returned represented as the first moment of
the period to which they refer, so do not round up to the next whole
period.

browser: gulp watch fixes

gulp-watch was hanging on syntax errors in app code.

gulp-plumber, gulp-if and lazypipe are essentially incompatible.

Replace gulp-if/lazypipe combination with gulp-filter.

Additionally, jshint fail reporter was doing some unknown bad business
and causing timing problems, so it is commented out. As a result,
if there are syntax errors, unit tests may still be run, anyway. This
may be considered a feature if you don't mind unit testing code that
you know has syntax/style problems.

Some servers' lifetimes were not being properly managed, those issues
should at least be improved if not corrected with this commit.

e2e: e2e task fixes, login/logout automation

Various fixes to e2e task and cucumber-support code.

Implement explicit tests of login/logout features.

java: do not .gitignore web contents under build

We are including a built version of the application under the
java-spring build directory, so we need to include that content in the
git repository by allowing git to manage the path:

build/resources/main/public

*: deploy built app to java server

So that users who do not wish to develop the browser app may still use
it, deploy a built version of the application with each build from
the browser.

Create a rewriter class in Java to support HTML5 "push state" routing.
(This turned out to be just as easy as making it support "index.html"
as the default file, and causes the URLs not to be switched up between
Node and Java renderings.)

browser build -> java server

browser: correctly launch gulp from gulp

When launching gulp tasks from within gulp, bind to the gulp instance
to avoid "isRunning" errors and breakdown of watch functionality from
improper use of Orchestrator.

Clean up error messages written to the console during build.

browser: handle default sorts in search

If there is no query text and no specified sort, default sort is
'active' (aka newest).

If there is is query text and no specified sort, default sort is
'relevance'.

Omit 'relevance' tab when search does not contain query text.

database: revert to 'lastActivity' constraint

*: move java tier's built browser app to 'static' dir

browser: CSSfix to prevent search tips from breaking qnadoc layout

browser: edits to search tips

remove "@foo.com" suffix from "user name" items
remove "resolved:false" from "status" items

Compilation changes for java snapshot update

test update

use public version of snapshot

browser: prevent autofill on login

A few specific browser builds do not raise events when autofilling. Disable autofill to prevent getting "stuck" and unable to log in.

search issues in internal 121 and max snippet chars

fixes #332.  Wildcard in search string is now a wildcard rather than ignored punctuation

e2e: add instructions to README

Add instructions for e2e commands to browser README.

browser: update gulp-mocha-phantomjs, change package name

browser: shrinkwrap package.json

chore(readme): update readme for EA3 dependencies

browser: randomize **characters** to prevent autocomplete on login

browser: do not attempt to populate date picker value if no constraint

browser: set datepicker-end date if specified as a constraint

browser: fix "NOT" item in search tips

browser: sort answers by votes after accepted

Sort accepted answer if present to top, sort the rest with higher
vote counts above lower vote counts.

browser: include stacktrace in error messages

browser: temporarily do not ignore credentials.js for update

Updating credentials.js.

browser: include examples of valid values in credentials.js

browser: reignore credentials.js

browser: unignore credentials.js (again)

browser: fix comments in credentials.js

browser: reignore credentials.js again

...the redundancy is real :)

browser: don't attempt to write static build while testing

Deploy static build after test run and serialize it into the flow
so as not to put stress on disks. May help with file copy problems.

javadocs

chore(browser/readme): incorporate content previously in main readme

browser: never do not disable log in button

Rather than fight with Firefox and its lack of events, leave the login
button enabled even if the password and username are not of minimum
length.

Suppress too-verbose logging

Update to Java EA-3 Client

browser: search tips edits

include examples for operators
formatting tweaks to keep examples on one line
extra space before bracketed info

READMEs

node: readme

Adding initial CONTRIBUTING.md file, with reference to the CLA

readme: updates for additional information

readme: simplify getting started

e2e: windows compatibility updates

browser: update tests for new login functionality

Login attempts are now allowed even without a minimum password length,
so remove test for the disablement of the submit button on login page.

browser: force username and password into login attempt

Lacking change events from some browsers when autocompleting forms, we
must manually read the values from the input elements just before
attempting to submit the credentials to the server.

e2e: use verbose connect to sauce

Log verbose output from sauce-connect-laumcher to find out if it is
missing an error message from SauceLabs (e.g. inability to connect).

update to EA-3 for buildScripts

browser: from readme, point to wiki for npm/node tips

browser: bower tested at 1.3.12

Issues have been discovered with bower that are fixed as of version
1.3.5. Make a note that MarkLogic QA has tested with bower 1.3.12.

Issues with testability, added test users, fixes volatility in joe and mary

Reputations for guest in seed data, fixes #321

Ignore accept search until seed data updated. Ignore tags test failure
until tags implemented.

Ensure mary and joe can be viewed by guest user

Fixes bug in whose reputations are affected by voting

Final test adjustments

Test update

Fixes loading of contributors, PR #356

Fix for hasVoting assertion

browser: contributor local test undefined OR null originalId

Some data is using originalId as `null` to represent local contributors,
while others are using originalId as `undefined`. Account for both
possibilities when determining whether a contributor is local or
StackOverflow.

Closes #358

browser: sort comments in chronological creationDate order

Sort all comments by creationDate, oldest first. (Answer sorting was
already implemented.)

Closes #350, #299

browser: on logout, go "home"

When a user session ends, navigate to "/".

Closes #275

fix(e2e): don't assume accountInfoLabel is present

fix(e2e) correct spelling of "loginIfNecessary"

fix(e2e): handle "name" property of Page object constructor correctly

Page object constructors were using the "name" property to indicate the
"code-ish" name for them when they were added to World.

The "name" property of a constructor is off limits and so instead we
had the constructor's actual name being used.

Use "pageName" property to define pages' names in order to avoid this
conflict.

starter files for ask tests

"ask" tweaks

fix(e2e): rename scenario

Rename a scenario that no longer described what it was testing.

e2e: getElementIfPresent function

Issues with protractor isPresent/isPresent element make it safer to
do this ourselves. Make a function that returns a promise of
an element or null, depending on if the locator points to a present
element.

e2e: work around cucumber next callback -> notifyOk

Cucumber's next function isn't promisified and thus considers a
truthy parameter to be an indicator of failure.

This is not an issue when we are dealing with chai-as-promised
expectations because they have .and.notify support.

Create a sugar function to be used when we don't have an expectation so
that any value which happens to be resolved in by a steps function
does not trick Cucumber into thinking something went wrong.

e2e: make use of notifyOk

e2e: remove "returnNull"

Now that notifyOk is implemented, step authors need no longer worry
about truthy return values, so this function isn't needed.

make use of notifyOk by ceasing to worry about returning promises
from functions

fix(e2e): locator/property fixes

* cooerce userName to boolean in isLoggedIn
* don't try to click missing element in accountDropdownOpen
* don't try to access logoutButton before opening accountDropdown
* use getElementIfPresent in accountInfoElement property

fix(e2e): don't try to reassemble tags CLI parameter

Pulling apart the tags cli parameter on the basis of commas hides the
more useful usecase of being able to run more than one specific tag, due
to the way protractor handles the expression. Thus, leave tags as a
single value, letting the user write any single expression in cucubmer's
language for specifying tags (e.g. https://github.com/cucumber/cucumber-js/blob/0d445d233270115643410b91ec7d9396067092e2/lib/cucumber/cli.js#L35)

e2e: tests for ask

e2e: authenticateAs, callback cucumber with errors

* authenticateAs new algorithm;
* pass errors in tests (as opposed to unmet expectations) back to cucumber as errors so that they are noticed/traced,etc.

e2e: promise handling (cuurrentPage -> self, use post/invoke)

For all functions/properties on PageBase, return "self" if there is no
particular element relevant to return. This simplifies writing chained
promises.

Use the Q invoke and post functions where we can to avoid more
complicated binding code.

Also fix errors where our bindings were presently "off".

browser: update `q` library to 1.1.2

e2e: separate action functions from element handlers in PageBase

Action functions should be wrapped in a Q promise so that its methods
may be used for sugar.

Element handlers should *not* be wrapped in Q so that webdriver chaining
works as expected.

e2e: ask submit test (in progress)

e2e: tag ask test as @broken

e2e: simplify logout

e2e: fix loginIfNecessary

(Properly) handle all three scenarios of loginIfNecessary.

e2e: use "official" feature names

For e2e features, use the names we've been managing to in development as
the titles of the features.

e2e: Explore page object, step refs and features + fix to login routine

e2e: tag broken scenario

e2e: refactor

Refactor code in cucumber-support so that page object files do not get
out of control. Move code for particular directives and dialogs into
their own modules.

Make some static step definitions variable to accommodate future growth,
enabling more steps to be written with fewer step definitions.

Be particular when the contributor matters, and don't worry about
who is logged in when any contributor will do. Use maryAdmin for steps
that modify seed data.

Align tags with feature names.

Add a few classes to source code to make locating them in e2e tests
easier.

e2e: add mary name expectation for ask

Mary sometimes seems to have trouble logging in in our ask-question
feature test. Add a specific expectation to determine early whether
or not her authentication is valid during the test.

browser: $timeout for dateRange facet directive load

Until we have support for searches that overlap superceding each other,
force the dateRange directive to wait to update, to lessen the
chances of having a conflict. This issue has only cropped up in e2e
testing where criteria changes are performed faster than humans could
do it. :)

browser: protect again missing content owner

Some seed data still has missing owner information for content.

Avoid javascript errors by only attempting to perform actions specific
to owner if owner property is actually present.

browser(build): build minified css

Build minified css with *external* source maps.

Improves page response time and avoids having built app change
its .css file based on the local directory structure of the developer
who most recently built the app.

browser: update several npm packages

Update npm packages to stay current.

browser: do not pre-load lodash anymore

Now that sauce-connect-launcher is fixed, do not pre-download
lodash in a preinstall script.

e2e: force protractor to use selenium 2.43.1

This is the last version of selenium compatible with PhantomJS until
PhantomJS/Ghostdriver is updated. On postinstall of the application,
modify protractor configuration to use 2.43.1.

Watch for https://github.com/detro/ghostdriver/pull/399 to be included
in a released version and then undo this.

e2e: use more consistent method on view-contributor tests

Use specific qnaDocs to test view-contributor functionality so that
test side-effects do not cause unpredictable results.

Also contains a variety of fixes to e2e test support code and introduces
the qnaDoc.page object.

e2e: default local browser is phantomjs

Change default browser for local tests to phantomjs.

e2e: implement a vote-on-question scenario

The scenario is currently broken due to #362.

joe and mary updates partially fixes #327 #334

dbload adjustment for seed data 1.6 #283 #282

Has Voted Fix. Needs new seed data #269

Add field configuration for default searches #304

title constraint

Dont return new vote structure in session info, return voteCount instead

e2e: use "standard" environment var names for sauce credentials

e2e: enable cloud-based testing on travis

browser: force protractor to use PhantomJS-compatible selenium

browser: remove shrink-wrap for floating npm

browser: revert node-sass to 1.0.3

node-sass inadvertently updated, revert

browser(testing): misc. code cleanup

* simpler gulp tasks where long-lived tasks not needed
* non-zero exit if unit tests fail
* stop using "ptor"/getInstance in e2e tests
* fix issues that confuse linux vs. node re: capitalization of modules

browers: contributor object gets voteCount

Move to use voteCount property rather than an array of votes to
improve scalability.

e2e: adapt tests, expectations to new seed data

browser: do not prevent voting on own content

browser(unit): modify watch code for changes to gulp-watch

gulp-watch api changed. Correct and simplify code that interfaces with
it.

e2e: do not attempt to execute broken tests in travis

e2e: use specific class name for question title in ask test

e2e: clean up .travis.yml, use repo settings in travis

In .travis.yml, remove commented-out code, add comments.

Also remove secure environment variables, which will be configured
per-fork in order to keep this file consistent.

chore: update browser dependencies

Update browser dependencies:

* everything from bower-update **except** angular-bootstrap
* everything from npm-check-updates **except** node-sass

(The two mention components have issues in more recent versions.)

Also solidifies login e2e test code, checking visibility when
determining loggedIn/loggedOut status.

browser: disable "show resolved only" temporarily

chore: put back updated shrinkwrap in prep for ea3.1

fixes issue of extracting snippets #304

transform for single question #362

Fixes issue #379

Fixes issues with search response and reputation partial #317 #225

Move to sjs transform, remove XQuery transform

Ignore date builder test for 3.1 release fixes #367 #368

Null users in SJS search response

browser: new skin

fix date filter width issue #382

fix sorting of comments (old to new), fixes #350

Misspelled property ("creationDate" is correct) and needed to reverse equality operator to greater than.

do not sort empty answer objects, fixes #389

do not sort empty comment objects, fixes #389

pressing Enter key in search box should submit a search, fixes #386

see: http://stackoverflow.com/a/15418063/3682288

Fixes issue #312, missing owner

browser(ssMarkdown): increase test timeout

Increase the timeout for ssMarkdown test from 150ms to 300ms.

Closes #378

Null owner test, smaller snippets

Ignore sort test for 3.1 release

browser: update footer for ea3.1

browser: increate timeout to 30 seconds for slow middle tier machine

On slow machines, JVM/Spring can take a long time to "warm up" after
it goes into "running state". Increase timeout to 30 seconds to help
slow machines on initial request.

browser: restore spinner layout after skinning

browser: new owner-contribtutor missing clues from api

API has new way of expressing lack of owner information for content.

Test them in order to determine if owner is missing, and show
"author unknown" in all cases.

e2e: restore e2e test functionality, other post-skin fixes

This is a relatively wide-ranging commit. It:

* adds back many css classes that are needed as e2e test hooks
* fixes exit code from tests for travis
* makes Chrome the default browser for local tests
* removes ids from html so as not to confuse angular or ourselves
* changes expectations to match latest seed data
* a few other miscellaneous changes to re-enable tests
* fix presentation of error messages, spinners
* skips MarkLogic install when secure env vars not available
* disables e2e tests on travis when secure env vars not available

Note on Chrome being the default: it appears that something in the
new skin is tripping up PhantomJS. This is unfortunate, and we should
track it down. It may be PhantomJS itself, it may be the agedness of
it's Webkit, and css transitions are a likely culprit.

In the meantime, PhantomJS think the login button is invisible and
refuses to click it. As such, it can't really be used.

This makes headless testing *only available via SauceLabs, which in
turn means that we cannot e2e test PRs which cross repositories.

e2e: bump firefox and chrome for sauce, increase timeouts

e2e: one seleniuum session at a time

We are less likely to get whacky timeouts from protractor/Sauce
interaction if we run only one selenium session at a time.

chore: readme tweaks for ea3.1

browser: layout for errors

Set margin-bottom and font size for global error, but not others.

e2e: use setLocation(url) where possible

use setLoction(url) when we already have the app in order not to reload
it: faster tests.

browser: package version -> ea3.1

browser: do not reference bower "bootstrap-sass"

... such a bower component does not exist!

chore: version -> v1.0.0-ea3.2

e2e: increase timeouts (again)

Still looking for stability under travis/sauce.

e2e: optimize navigation, order of tests for different users

add travis

Changes to work with getDocumentUri, new in PojoRepository

travis: use most recent nightly trunk build

readme: reference nightly builds instead of ea3

browser: "un"shrinkwrap

browser: fix error display layout

browser: temporarily use fork of gulp-sass

Enables node-sass version 2-beta usage, which solves issue with
build paths showing up in built app css file.

browser: cursor should remain default over inactive Ask a Question button

browser: add clear button when search box not empty

browser: adjust search tips margins

browser: update comment metadata alignment, content

browser: reinstate ISO 8601 strings

Throughout app, discontinue forcing dates into UTC/assumptions of GMT.

Instead, allow time zones/offsets to be included.

browser: center date filter inputs

browser: format comment submission forms

browser: disable comment buttons if not logged in

browser: add border around unselected tabs (markdown textareas)

browser: show human readable time since on metadata

Since current logic for date formatting is in the ssQnaDocMetadata directive, adding there.
Time since shows when timestamp is less than a week old.
Note: duration object isn't available on our mlUtil.moment objects so getting duration with math (see ssQnaDocMetadata.js daysSince()).
Also removing unused formatData() method in ssQnaDoc.js.

browser: clear search box text when a qnaDoc is viewed

browser: push answer anchor divs up to account for fixed navbar

This enables us to link directly to an answer (from a snippet) without the top of that answer being hidden under the navbar.
Note: we use $uiViewScroll defined in appRouting.js for scrolling to the anchor

browser: disable Submit Comment button if comment textarea empty

browser: disable Post Your Answer button if answer textarea empty

browser: misc date filter fixes

- date picker color scheme and typography
- close button label
- date fields clear if result list is empty

browser: workaround for bn.js

Watch https://github.com/substack/node-browserify/issues/1049 for
permanent solution.

browser: add timezone to search params

Add timezone property to search parameters.

BREAKING CHANGE: the server rejects this query because the new parameter
is not expected.

```
{
  "data":{
    "status":400,
    "message":"com.marklogic.client.FailedRequestException: Local message: search failed: Bad Request. Server Message: XDMP-ARGTYPE: (err:XPTY0004) fn:node-name((sort:active, America/Los_Angeles)) -- arg1 is not of type node()?"
  },
  "status":400,
  "config":{
    "method":"POST",
    "transformRequest":[
      null
    ],
    "transformResponse":[
      null
    ],
    "url":"/v1/search",
    "data":{
      "query":{
        "qtext":[
          "",
          "sort:active"
        ]
      },
      "start":1,
      "timezone":"America/Los_Angeles"
    },
    "timeout":30000,
    "headers":{
      "Accept":"application/json, text/plain, /",
      "Content-Type":"application/json;charset=utf-8"
    }
  },
  "statusText":"Bad Request"
}
```

Middle tier mods to accept (and ignore) timezone

browser: track in-progress node-sass v2

Update sass handling to reflect changes in gulp-sass resulting from
upgrade to node-sass version 2.

browser(ssFacetDateRange): simplify results population into highcharts

Use moment to parse dates and represent them in series for highcharts
as Javascript native dates.

browser(ssFacetDateRange): code style cleanup

browser: always select by month (in browser time zone)

On click or drag, select ranges by month and preserve browser-local
timezone. Add test which verifies timezone information is preserved.

Closes #410, #411

browser: date facet chart tooltip styling
fixes #408

browser: angular (and related) modules -> 1.3.8

browser: avoid unnecessary resolutions in bower

Recent version of bower not only doesn't need so many clues as to
which version of a dependency is to be installed, but in fact complains
if we specify resolutions that it deems unnecessary. Therefore, do not
specify any resolutions that are not needed.

Closes #456

browser: close Search Tips box on clear search (bug #417)

closes #417

browser: use Bootstrap alert style for login error message (bug #419)

closes #419

browser: clear button resets mode to Browse (bug #416)

closes #416

browser: show "(filtered)" in search header when filters applied (bug #421)

closes #421

browser: vote summary tile should reflect approval state (bug #424)

added logic for applying answered class based on accepted property
also fixed logic where owner ID needed to be compared with user ID (was being compared against session ID)

closes #424

browser: show pointer when cursor hovers over "Not yet accepted" indicators (bug #431)

added relevant CSS (cursor: pointer)
reversed containing classes for accepted/unaccepted, which were wrong

closes #431

browser: hide Tags Filter divider when no tags selected (bug #426)

closes #426

browser: suppress extra browser form validation in login form (bug #446)

closes #446

browser: update footer links (bug #418)

closes #418

browser: update style of Account Details dialog (bug #442)

To support data display in Account Details, defined voteCount property in ssContributor object.

browser: update contributor unit tests to address reskinning of Account Details dialog

closes #442

browser: clicking tag chiclet should clear all other filter selections (bug #441)

closes #441

browser: fix footer layout on QnA Doc page (bug #433)

closes #433

browser: add prompts to ask and answer markdown inputs

closes #434, #437

browser: disable ask submit button if title or text are empty

closes #438

browser: fix double quote issue

browser (e2e): update ask page test due to change in form validation

See fix for #438, now both title and text field are required for submit button to be active.

e2e: disable failing ie9 step (verify tag entered in ask)

IE9 has a failing e2e test that is as yet unexplained (see #457). For
now, when testing IE9, disable the one step that fails so that it does
not fail all builds.

chore: travis badge link fix

Correct travis badge so that it links to the travis site for
Samplestack and displays status of most recent build.

e2e: include java unit tests in travis on push

chore: remove spurious option, javadoc

combined query for search

Fixes NPE for old query payload warning

rename marklogic.com to example.com #377

Voting redesign, java code side, part of issue #374

seed data 1.7 extract, public URL

data changes for timezones

make accepted boolean values work again fixes #352

dbload correct for seed-data1.7

browser: refactored search API

browser: update email to example.com

All emails -> <user>@example.com.

Closes #377.

browser: new voting api, reputation sync

Employ new API for tracking votes within qnaDocs.

Synchronize session user reputation after votes on own content.

Re-enable related e2e tests, remove unit tests-related code for
prior API.

Closes #374, #362.

Accept pach must be boolean not String

browser: re-enable resolved only

Re-enable resolved only feature and enable/fix its e2e test.

browser: don't crash if livereload fails

Sometimes livereload is failing to "poke" the coverage server.

If this happens, don't let it cause the watch task to bomb.

update copyrights, fixes issue #451

Timezone support for date buckets, fixes issue #159

Snippeting review with @yawitz.  Addresses issue #371

Findbugs suggestions issue #232

browser: use angular-ui component for pagination

browser: show formatted message for guests instead of answer form

closes #435

browser: handle unknown users in question metadata

Use "unknown" as user name, do not show reputation.
Also added "by" between date and user name as specified in wireframes and skin screens.

closes #312

browser: update footer to read "Samplestack 1.0.0"

README has already been updated to read "1.0.0" (see marklogic/samplestack-internal#69)

closes #463, closes marklogic/samplestack-internal#69

browser: catch up built app with src

browser: add outbound link icon to comment user names

closes #450

browser: add question title clear button

closes #436

chore: catch up built app with browser src

browser: Search Tips update for 1.0.0

closes marklogic/samplestack-internal#121

browser: clear the search box on tag chiclet selection

closes #468

browser: use 24-hour time for doc metadata

closes marklogic/samplestack-internal#165

browser: fix search box layout issues when width narrows

closes #467

e2e: test updates for new seed data

e2e: test expectations

e2e expectatios

clean up contributor vote count

e2e expectations

e2e expectations

e2e expectatons

e2e: tell jshint about protractor global

e2e: dismiss contributor dialog when done with it

e2e: expect contributor properties "greaterThan"

Use greaterThan in order to increase chances of not having to
re-seed data when repeatedly running e2e tests.

e2e expectations

e2e: contributor dismiss dialog

e2e: partially fix vote tracking

Implement fixes for @vote-on-question.

The e2e test is still broken. There may be a promise that is escaping
resolution, or something to that effect. This commit substantially
implements the tests, though, while adding a @broken tag until a
further fix is made.

e2e: make mine-only test more impervious

Make the "explore-docs-by-mine-only" test somewhat impervious
to conditions in the seed data.

browser: App-wide Tooltips (merge)

Closes #473

same changes, merged to latest browser-develop

browser: completed work on tooltips + fix to drop down HTML for v0.12.0

Also added come SCSS to handle tooltip width dimensions with @yawitz

Closes #473

browser: update footer text (Stack Overflow wording)

closes #418

browser: debounce watch by 250ms

Wait 250ms, making it less likely that watch task will "go nuts" during
bulk changes to watched files.

browser: completed work on tooltips + fix to drop down HTML for v0.12.0

Also added come SCSS to handle tooltip width dimensions with @yawitz

Fixes #473

browser: Date picker wrap-up

Adds on blur and on enter key as trigger to apply picker date value while manually entering a date.

Add validation where if the currently focused date input is set to an invalid range, the other input is set to match its date, setting the range to a span of one month.

Closes #412 and Closes #414

Briefly swaps out the bound model value so when the pop-up renders, it reflects the placeholder date.

Closes #469 and closes #413

/v1/tags reimplementation fixes #401
Closes #401

Fixes issue with tests #367

upgrade spring and gradle

gradle support for sjs service extensions

Related Tags

chore: remove old extensions

browser: ie compatibility -> edge

browser: setLoading(false) on any error loading qnaDoc

e2e: run 3 Sauce browsers at a time

maxSessions -> 3 so that Travis doesn't terminate testing due to slow
Sauce. Hope this doesn't create different problems.

browser: only act on most recent shadowSearch in explore

Track search promises in array, only take action if the resolved
search is at the top of the stack.

Closes #390, #119

e2e: script-related timeouts -> 180 seconds

Should help with cases where IE has bombed due to angular issue 10214,
by failing out of the test before SauceLabs ditches it in a way …
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
call function (Fixes sass#418) it works I seen it with my own eyes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests